Lets say I have the following XML (heavily simplified sample of my actual XML):
<myxml>
<cities>
<city>Amsterdam</city>
<city>London</city>
<city>Paris</city>
</cities>
<hotelLocations>
<hotelLocation>Amsterdam</hotelLocation>
<hotelLocation>Berlin</hotelLocation>
</hotelLocations>
</myxml>
Now I would like to know if the values in the hotelLocation
do actually exist as cities. I am trying to do that in just one XPath statement:
//hotelLocation=//city
However, this will give "true" back if one of the hotelLocations
matches, instead I only want it to give true if all of the hotelLocations
exist in the cities entities.
Any idea if this is possible with one XPath statement at all?