XML Script logo
Function sum
Name

sum

Returns

number

Parameter count

1

Parameter 1

item, a pointer(s)

Description

This function converts the contents of all the 'item' elements (or attributes) to numbers, and returns their sum. e.g.
<foo value="1" /><foo value="2" /><foo value="3" /><foo value="4" />
# sum($foo.value) # returns 10

Examples of use

                                
                        

XML Script homepage | Documentation home | XML Script docs | Command list | Function list | X-Tract docs

X-Stream, X-Tract and XML Script are trade marks of DecisionSoft Limited
© Copyright 1998-2000 DecisionSoft Limited