|
I'm a toal newbie with XPath, so please bear with me. I have read through the tutorials and still c
+an't figure out how to do what I need.
I have an XML file whose structure looks like this:
<question>
<term>
<validity>
<decision>yes</decision>
</validity>
</term>
</question>
where the decision could be either yes or no. The file has lots of other tags, but those will suffi
+ce for this post.
I want to select all the <question> nodes whose decision is 'yes'.
I am able to retrieve all the <decision> nodes whose value is yes with this expression:
//question/terme/validite[decision='oui']
but I can't figure out how to retrieve the <question> nodes which are ancestors of those.
Thank you for your help.
|