Command "For"

Summary

For each elements returned by the XPath-query, the commands embraced by the 'for'-command are executed. The command belongs to the group "Control".


Parameters

Parameter Name Description Type
IteratorEleRef The name of the reference under which the actually selected element will be accessible. saveElementReference
NodeRef The name of the reference to the node on which the XPath-query is executed. nodeReference
SortAttr The name of the attribute used to sort the elements returned by the XPath-query. valueexpression
XPath The XPath-query statement. xpath

Valid parameter combinations



Description

Loops over a set of elements selected by an XPath expression. Use the "IteratorEleRef" to access the current element of the For loop.

Examples


Example 1

The example below iterates over all elements and echos its content and attributes to the log file.
<For NodeRef="$myElements" XPath="//Name" IteratorEleRef="iter">
<EchoEle EleRef="$iter"/>
</For>