I have the following xml
<collection>
<item>
<id>001</id>
<attributes>
<attr1>A</attr1>
</attributes>
</item>
<item>
<id>002</id>
<attributes>
<attr1>A</attr1>
</attributes>
</item>
<item>
<id>003</id>
<attributes>
<attr1>B</attr1>
</attributes>
</item>
</collection>
I need my xpath query to return me "true" if all attr1='A'. I tried with this but it returns "true" even if only one attr1="A".
//item/attr1/text()='A'