Is it possible for an xpath selection to return the absolute path for each node found?
for quick example
//chapter
to return
//book[1]/chapter
//book[2]/chapter
...
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No easy way to do so just using XPath. If you are using XSLT, there are several recipes available, for instance http://www.dpawson.co.uk/xsl/sect2/N6077.html#d7984e96.