the following xpath:
- Code: Select all
/A/B[//C='want']
on the following XML:
- Code: Select all
<A>
<B><C>don't want</C></B>
<B><C>want</C></B>
<B><C>don't want</C></B>
</A>
returns 3 nodes instead of just the one.
to get the result I want I need to use
- Code: Select all
/A/B[descendant::C='want']
I though
- Code: Select all
//
- Code: Select all
descendant::
, i.e. select descendant nodes of the root element??/descendant::
Have I missed something?
PS: example kept deliberately simple: please do not tell me I do not need // to get what I want





data server software 