Extracts nodes from current HTML into a variable in JavaScript scope.

The Get nodes statement extracts a list of nodes from the web page DOM and sets a local JavaScript variable in the JavaScript scope of its parent statement. This variable contains a Java NodeList object, i.e. a list of XML nodes, extracted from the HTML page thanks to the execution of an XPath on the page DOM. This XPath is defined in XPath property.
The variable is named after the Variable name property value. It exists while its parent Handler or Function is executing.
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 of the DOM. To access one (Node) of the list, use the following syntax in a statement: 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.
Delay if XPath not found long standard Defines the maximum delay the statement waits if the XPath doesn’t currently exists.
When no node in the page DOM matches the XPath defined in XPath property, the statement waits for it to match up to this delay, set in milliseconds.
Convertigo tries to evaluate the specified XPath while receiving a web page or executing JavaScript in it. Once the XPath matches at least one node of the page, the statement continues its action.
Note: It is equivalent to defining a statement Wait synchronization with an XPath synchronizer before this statement, waiting for the same XPath.
Is active boolean standard Defines whether the statement 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.
XPath JS expression standard Defines the XPath expression of elements on which the statement applies.
Depending on the statement, the execution of this XPath on the web page DOM can result in a single Node or a NodeList.