XPath Iterator
This adapter selects a node set, a node or node content using an XPath expression in an input XML document, and outputs a node set as XML document or values as text document. The adapter can either iterate through all matching nodes and output the results successively (ForEach
loop) or it can output the result of the first match.
If you define several XPath Iterators within one process context, it is required to assign an explicit ID for the corresponding adapter within the parameter Id
, e.g. 1001
, 1002
etc. Thus, it is ensured that only the XPath Iterator with the corresponding ID will be affected (see operation Clear
) when selecting or resetting the iterator in the forEach
mode.
If the default value of the parameter Id
remains on 0
, the ID is equivalent to the process step number (action ID) in the current process. This ID may not be unique, if an XPath Iterator with the same action ID is used in a subprocess.
Properties
Operation | Defines the operation executed by the function adapter Possible values:
|
Parameters
Adapter | Main adapter class (do not change!) Possible values: |
XPath | XPath expression applied to the input XML document Possible values: Any XPath expression (e.g. |
forEach | Select the first node or all matching nodes Possible values:
|
Id | Unique ID of the XPath Iterator component within the process context or within the process instance (when using several independently iterating XPath Iterators within the same process context) Possible values:
|
Status values
-1 (error) | Error when executing the adapter (for details, see the server log) |
0 (empty) | The adapter doesn't output data (anymore). In the iterator mode, this status can be used as stop criterion of a loop within the Technical Process. It indicates that no further data row is available. |
1 (successful) | The adapter outputs a result. In the iterator mode, this status can be used as condition to enter a loop within the Technical Process. It indicates that further data row is available. |