Hi Team,
I have been trying to execute an XPath expression in order to get the sum of a few nodes but it returns an "invalid XPath expression"
Below is the sample xml
"<Xavor>
Hi Team,
I have been trying to execute an XPath expression in order to get the sum of a few nodes but it returns an "invalid XPath expression"
Below is the sample xml
"<Xavor>
Please post the full error message!
It seems like PAD only supports retrieving nodes and its attribute values, not calculated values.
So you need to get all desired node values first as a list and then process this list for calculation.
I have tried the above path expression, but it's still giving me error as "invalid XPath expression"
Can you please help me?
Try this
sum(/*/Dev/Salary[string(number(.)) != 'NaN'])
WarrenBelz
146,670
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,004
Most Valuable Professional