populate a treeview with xml file using c#

Posted by syedsaleemss on Stack Overflow See other posts from Stack Overflow or by syedsaleemss
Published on 2010-05-13T06:32:59Z Indexed on 2010/05/13 7:04 UTC
Read the original article Hit count: 166

Filed under:

Im using c#.net windows form application. I have an xml file that contains nodes. I need to populate a treeview with the nodes present in the xml file. Also avoid repeated node names. For this my idea is while populating the treeview, copy the node names into a list and there see if the node already exits. If it already exits, go to the next node else display it. List listOfNodes = new List();

listOfNodes.Add(xNode.Name.ToString()); //if (!(listOfNodes.Contains(xNode.Name.ToString())))

I was trying with this. but Im unable to do. Please suggest me with a proper code.

© Stack Overflow or respective owner

Related posts about c#