rpaquixote
Programmer
I have an xml doc formatted as follows:
<models>
<model>
<name>model 1</name>
<price>$20,000</price>
</model>
<model>
<name>model 2</name>
<price>$50,000</price>
</model>
</models>
I need to get all nodes greater than $45,000.
I have the following XPATH (which does not work):
string xpath = "//models/model[number(translate(price, '0123456789', '012345678'))>number(45000)]";
XmlNodeList nodes = XDoc.SelectNodes(xpath);
(I'm using C#)
Does anyone know the correct syntax??
THANKS!
<models>
<model>
<name>model 1</name>
<price>$20,000</price>
</model>
<model>
<name>model 2</name>
<price>$50,000</price>
</model>
</models>
I need to get all nodes greater than $45,000.
I have the following XPATH (which does not work):
string xpath = "//models/model[number(translate(price, '0123456789', '012345678'))>number(45000)]";
XmlNodeList nodes = XDoc.SelectNodes(xpath);
(I'm using C#)
Does anyone know the correct syntax??
THANKS!