XML predecessors

In C # I need to get

currentnode.parentnode.parentnode.parentnode.firstchild.lastchild.lastchild

      

I am using some label to generate my MLM tree, which is an individual node overload at the fourth level, so I was trying to get those nodes and separate them.

I am new to XML, I hope my question is clear.

0


a source to share


2 answers


If you have a current node, with whom you want to work, then XmlNode defines a property ParentNode FirstChild and LastNode, which you can use for this , see .



0


a source


Consider using XQuery or XPath to execute queries against your XML tree. There's a nice tutorial here that shows all the common options.



0


a source







All Articles