Let’s say I have some XML like this:
<group>
<request>
<field id="a"/>
<field id="b"/>
<field id="c"/>
</request>
<request>
<field id="a"/>
<field id="b"/>
<field id="d"/>
</request>
</group>
Note that the order of the <request> elements is not guaranteed.
I want to come up with two XPath expressions, the first to check that a <request> with children a,b and c exists, and the second that a <request> with children a,b and d exists.
How do I specify this? The closest I’ve come uses the numbered predicate syntax, but I’m missing something on how to specify multiple child matches, and the fact that the order of the <request> elements is not defined is also tripping me up.
Thanks in advance
Glenn.
Isn’t this what you are looking for ?
?