Xml to treeview to datagrid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • saravanaVijayakumar
    New Member
    • Oct 2006
    • 2

    Xml to treeview to datagrid

    I'm new to xml ..

    I had created a application such a way that I have to display the xml file in treeview control in C#.Net Application ...

    If I select the particular Node it should display the attributes of that node in DataGrid

    But I am displaying the attributes in dataGrid if i use the following Code
    XmlNode x = root.SelectSing leNode("//JDF")


    If i am using nodeset in xml for searching the specified node
    XmlNode x = root.SelectSing leNode("//LocalName'"+tre e.SelectedNode. Fullpath+"'")

    An unhandled exception has occured in your application .
    localname'JDf\c ustomerinfo\com pany\contact\co mchannel' has an invalid token.



    If I am using Without Nodeset
    XmlNode x = root.SelectSing leNode("//'"+tree.Selecte dNode.Fullpath+ "'")

    An unhandled exception has occured in your application .
    The Expression passed to this method should result in a NodeSet..





    But the problem is I have to display the Attributes of a particular node in DataGrid based on TreeView_AfterS elect event.......... ......
    ---------------------------------------------------------------------------------
    XmlNode x = root.SelectSing leNode("//LocalName'"+tre e.SelectedNode. Fullpath+"'")

    --------------------------OR----------------------------------------------------
    XmlNode x = root.SelectSing leNode("//'"+tree.Selecte dNode.Fullpath+ "'")
    ----------------------------OR-----------------------------------------------------


    I need altenate code for above mentioned line .....


    Please help me ............... ..........
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    Qestion moved to .NET Forum.

    Comment

    Working...