My example XML is as follows:
<FileList>
<File>
<Name>20120427_1.pdf</Name>
<Size>654441</Size>
<Property>
<Name>Country</Name>
<Value>United States</Value>
</Property>
</File>
<File>
<Name>Name2</Name>
<Size>2147483647</Size>
<Property>
<Name>Name4</Name>
<Value>Value4</Value>
</Property>
<Property>
<Name>Name5</Name>
<Value>Value5</Value>
</Property>
<Property>
<Name>Name6</Name>
<Value>Value6</Value>
</Property>
</File>
<File>
<Name>Name3</Name>
<Size>2147483647</Size>
<Property>
<Name>Name7</Name>
<Value>Value7</Value>
</Property>
<Property>
<Name>Name8</Name>
<Value>Value8</Value>
</Property>
<Property>
<Name>Country</Name>
<Value>UK</Value>
</Property>
</File>
</FileList>
The requirement is that every file node has a Country value in the Propery/Name element. So far I've created an XPath query:
/FileList/File/Property/Name/text()='Country'
This passes as true as query is looking at all nodes when the answer should be false. How do I change it so it checks each 'File' node instead?