Using xpath to select a value based on another elements value



I'm looking to extract 8 from below piece of XML based on either Shoe Size or MenShoesShoe Size using XPATH.

I've tried some variations but I can only select individual values i.e 8.

And the whitespace is causing issues too, can anyone be of help please?

Of coarse, the whole XML contains many colors and sizes so I'd be looking for all sizes.



<Entry>
<Attributes>
<Values>
<values>Tan</values>
<identifier>Tan</identifier>
</Values>
<identifier>MenShoesColor</identifier>
<name>Color</name>
</Attributes>
<Attributes>
<Values>
<values>8</values>
<identifier>8</identifier>
</Values>
<identifier>MenShoesShoe Size</identifier>
<name>Shoe Size</name>
</Attributes>
</Entry>

No comments:

Post a Comment