Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

Given XElement item how can I find its XPath

$
0
0

Hi there, I am facing this simple problem I cannot immediately crack. I search thru an xml file, find a few nodes I need and collect the objects (XElement(s)). How can I get the XPath to each of them? And I mean the expression string.

 

I search for the nodes by a value of one attribute ( "ID" ) that each node has. They are unique and are used for identification. The nodes themselves all have identical names: "Item," except for the root node which is "Items" thus I cannot use them for search to determine the path.

 

Thanks.


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>