7.4

Table Of Contents
The XMLPath of the value you want to retrieve. The path must correspond to a single entry in the XML, thus is not a complete
XPath with regular expressions and variables.
Code Sample
The following gets the number of items in an invoice, loops through each item and displays the item's description with show().
define(&i, integer, 0)
define(&currentItemDescription, string, '')
define(&numberOfItems, integer, xmlcount('/MyData/CUSTOMER/INVOICES/INVOICE/ITEM'))
for(&i, 1, 1, &numberOfItems)
&currentItemDescription := xmlget('-
/MyData/CUSTOMER/INVOICES/INVOICE/ITEM['+inttostr(&i)+']/Description')
show(&currentItemDescription)
crlf()
endfor()
Measure
Add (function)
Adds two numerical expressions. This is the functional equivalent to the + operator, when you use the + operator with numer-
ical expressions.
Syntax
add( expression, expression2 ) integer, measure, currency value
Arguments
expression1, expression2
Integer, measure, or currency values. Both expressions must be the same type. The returned value is set according to the
type of the parameters.
Code Sample Examples
Examples 1 and 2 show both ways of adding numbers.
Example 1
show(inttostr(2+2)) %Displays 4
Example 2
show(floattostr(add(4.7,2.1))) %Displays 6.8
©2010 Objectif Lune Inc - 530 -