xpath for price with currency

Asked by At
    <Movi Name="Test">
    <Movi Name="test d">

can anyone help on this XML to find movie greater than $11 with XPath

2 Answers

igneus On Best Solutions

Given all prices are in the same currency and format, this bit of XPath does the job:

/category/Movi[number(substring(./Price/text(), 2)) > 11]
Jack Fleeting On

Just for the sake of completeness, another option is:

//Price[number(translate(text(), '$','')) > 11]