Jack Frillman
Usenet Archive
- Joined
- Apr 12, 2000
- Messages
- 3
- Reaction score
- 0
Below is an xpath that works. It returns all the values of the "value attribute" of the OutputField tag:
//Satellite/multidataset/file[contains(@name, '311multi')]/Data/ DriftAnalysis[contains(@name, '311')]/Metric[@name='Detail' and @type='Overlap']/Element[@metrictype='Overlap']/ OutputField[@name='Cleared']/@value
But when I try to sum the returned values of the "value attribute" using the sum function like the example below I get the error "Expression must evaluate to a node-set". Can anyone tell me why and how to fix it?
sum(//Satellite/multidataset/file[contains(@name, '311multi')]/Data/ DriftAnalysis[contains(@name, '311')]/Metric[@name='Detail' and @type='Overlap']/Element[@metrictype='Overlap']/ OutputField[@name='Cleared']/@value)
And here is a snipit of the xml file that I'm zeoring in on.
//Satellite/multidataset/file[contains(@name, '311multi')]/Data/ DriftAnalysis[contains(@name, '311')]/Metric[@name='Detail' and @type='Overlap']/Element[@metrictype='Overlap']/ OutputField[@name='Cleared']/@value
But when I try to sum the returned values of the "value attribute" using the sum function like the example below I get the error "Expression must evaluate to a node-set". Can anyone tell me why and how to fix it?
sum(//Satellite/multidataset/file[contains(@name, '311multi')]/Data/ DriftAnalysis[contains(@name, '311')]/Metric[@name='Detail' and @type='Overlap']/Element[@metrictype='Overlap']/ OutputField[@name='Cleared']/@value)
And here is a snipit of the xml file that I'm zeoring in on.