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

what is the syntax for an xpath to select a node by the children's indices

$
0
0

I'm having problems figuring out how to construct an xpath that will select a given node based on selecting nodes based on their "child" index. For example what would be the xpath to select 4th grandchild of the 2nd child from the root of an XML document?

None of these work:

root/*[2]/*[4]

/child::*[position() = 2]/child::*[position() = 4]


Developer Frog Haven Enterprises


Viewing all articles
Browse latest Browse all 935

Trending Articles



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