Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
A version of this page is also available for
4/8/2010
Returns the sum of all nodes in the node set. Each node is first converted to a number value before summing.
Syntax
number sum( node-set) |
Parameters
- node-set
-
A node-set.
Return Value
Returns the sum of all nodes in the node set. Each node is first converted to a number value before summing.
Remarks
Given the following XML document:
Copy Code | |
---|---|
<root> <a>1</a> <a>3</a> <a>2</a> </root> |
The following function call returns 6.
Copy Code | |
---|---|
sum(//a) |