I have this xml.
<collection>
<item>
<id>001</id>
<attributes>
<attr1>A</attr1>
</attributes>
<attributes>
<attr1>B</attr1>
</attributes>
</item>
<item>
<id>002</id>
<attributes>
<attr1>B</attr1>
</attributes>
</item>
<item>
<id>003</id>
<attributes>
<attr1>A</attr1>
</attributes>
</item>
</collection>
I need my xpath query to return me "true" if each item
element contains at least one attributes/attr1='A'
.
I had a go with this xpath as I tried to elaborate on this thread (thank you Mads, you answered the wrong question, my bad)
//item/attributes/attr1/text()='A'