XPRESS uses an XML syntax that is easy to parse and manipulate and can be embedded naturally in other XML vocabularies used within Identity Manager. The names of the XML elements are the names of functions to be called. Nested elements are the arguments to the function. In addition, there are beginning and end tags for each element (in this case, <add></add>).
<add> <ref>counter</ref> <i>10</i> </add>
In the preceding example, the <add> element represents a call to the function named add. This function is passed two arguments:
first argument– value is determined by calling a function named ref. The argument to the ref function is a literal string that is assumed to be the name of a variable. The value returned by the ref function is the current value of the variable counter.
second argument– value is determined by calling a function named i. The argument to the i function is a literal string that is an integer. The value that the i function returns is the integer 10.
The value returned by the add function will then be the result of adding the integer 10 to the current value of the variable counter. Every function call either returns a value or performs an operation on one of its arguments. For example, if the ref call returns the value of the counter, then the <i> call returns the integer 10, and the <add> call returns the addition of the two calls.
Another example is the classic Hello World program, which is written in XPRESS as follows:
<print><s>Hello World!</s></print>