populate a treeview with xml file using c#
- by syedsaleemss
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.