i have the next instruction, in JavaScript:
var firstScene = document.evaluate('//Scene', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
so my question is how to get the full path of the node firstscene?
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.
Using this getXPath() function:
pass the DOM ojbect obtained from
firstScene.iterateNext()to thegetXPath()method and it will return an array with all of the XPATH steps.You can then use the array
join()method to return a full XPATH expression: