Defines a step extracting a list of nodes from a source into a variable in JavaScript scope.

The jSource step gets a list of nodes from the source defined in the Source property and sets a JavaScript variable in the current executed sequence JavaScript scope. This variable contains a Java NodeList object, i.e. a list of XML nodes get from the source.
The variable is named after the Variable name property value. It exists while the sequence is running.
If only one node matches, the variable is also a NodeList containing only one Node (index is 0). If no node matches, the variable is finally an empty NodeList, containing no Node (var_name.getLength() = 0).
Notes:

• The variable contains a list of node elements get from a previously executed step. To access one (Node) of the list, use the following syntax in a step: var_name.item(index).
• To access one element’s text content (String), use the element.getTextContent() method, to retrieve the text of the element, or the element.getNodeValue() method, which result depends on the node type (will extract a text only if the Node is of Text or Attribute type).

Property Type Category Description
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.
Variable name String standard Defines the name of the JavaScript variable.
If this variable exists in scope, its value is overridden. If the variable doesn’t exist in scope, it is created.
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 to extract.
This property allows defining a list of nodes from a previous step that are set in a JavaScript variable, as described in the main description of this step.
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, depending on the step, the variable is created:

• as an empty NodeList with no data (for jSource step),
null (for jSimpleSource step).