Page 1 of 1

XML reader - Get Value of element when attribute = a Value

Posted: Fri Feb 15, 2013 2:32 pm
by DavidKing
Anyone know how I can get the value of an element when a attribute value = a value?

Example:

I have this XML

<custom-attributes>
<custom-attribute attribute-id="proratedNetPrice">7.0</custom-attribute>
</custom-attributes>

I need to get 7.0 from this path when attribute-id="proratedNetPrice"

This gives me the text "proratedNetPrice"
/orders/order/product-lineitems/product-lineitem/custom-attributes/custom-attribute/@attribute-id

Thanks.