Defines a loop step iterating on XML nodes result from a source.
Also called For Each step, the Iterator step:
• defines a source as input list to work on, i.e. a list of nodes from a previous step, used as a recurring element (for example table rows),
• iterates on each element of the specified source,
• contains child steps that are executed on each iteration, as other loop steps (for example, see “jIterator”, “jWhile” and “jDoWhile” steps documentation and examples).
In the iteration, child steps can access and use the current iterated element:
• using a source pointing on the Iterator step itself,
Note: The current item value can be accessed using the following code statement:
• item.getTextContent() if the Node is of Text or Attribute type,
• item.getNodeValue() if the Node is of Element type.
|Comment||String||standard||Describes the object comment to include in the documentation report.
This property generally contains an explanation about the object.
|Is active||boolean||standard||Defines whether the step is active.|
|Starting index||JS expression||standard||Defines the index from which the Iterator should start to iterate.
In the case you do not want to start an iteration at the first item (index 0), you can specify a starting index in this property.
If the defined starting index does not exist in the source list, the loop does not execute its child steps and the parent sequence execution continues.
|Stopping index||JS expression||standard||Defines the exclusive index to which the Iterator should stop to iterate.
Intended mostly for testing purposes, this (optional) parameter limits the number of times the iterator loops if this last index is reached.
|Output||boolean||expert||Defines whether the XML generated by this step should be appended to the resulting XML.
Set this property to true to add the step’s resulting XML to the sequence’s output XML (default value for steps generating XML). Set this property to false to prevent the steps’s XML result to appear in the sequence’s output XML.
Setting this property to false does not prevent the step’s generated XML from being used as a source by other steps.
|Source||XMLVector||expert||Defines the source list to iterate on.
This property allows defining a list of nodes from a previous step on which current step works.
A source is defined as a reference on a step previously existing in the parent sequence, associated with an XPath applied on the step’s result DOM. At runtime, the XPath is applied on the step’s current execution result XML and extracts a list of XML nodes resulting from this execution.
If the XPath doesn’t match or if the source is left blank, the step has no data to work on: the loop does not execute its child steps and the parent sequence execution continues.