Something like:
find node: qp( $doc, 'UniqueSubNode' );
string representation: Root>Node>InnerNode>UniqueSubNode
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.
In QP parents() will get you all the ancestors, then all you need to do is html() each of them, I hope it helps.
Refer to this: http://api.querypath.org/docs/class_query_path.html#aae3c29dfc81839c3c054e7d608facd76