In my current project (winform), i am feeding a treeview with an xml. The xml is build up like this example:
<Root>
<ns code="NS" description=" - New">
<someName code="5M" description=" - some 5M">
<entry1 code="TN" description=" - some description 1" />
<entry2 code="TO" description=" - some description 2" />
</someName>
<someOtherName code="6M" description=" - some 6M">
<entry1 code="TN" description=" - some description 1" />
<entry2 code="TO" description=" - some description 2" />
</someOtherName>
</ns>
</Root>
Im populating my treeview based upon the code and description, so the treeview looks like this:
But now i wand to be able to add nodes to the xml based upon the selected node in the treeview.
Now i am wondering, is it somehow possible to get the xmlNode, based upon the selected Treenode (that is based upon non-unique attributes).
What would be the best practice to accomplish this ?