moveToNext()
Moves the position of the pointer in the source data file to the next line, row or node. The behavior and arguments are different for each emulation type: text, PDF, tabular (CSV), or XML.
This is a method of the steps object (see steps).
moveToNext(scope)
Moves the current position in a text file or XML file to the next instance of scope
. What scope
represents depends on the emulation type: text or XML.
Text
scope
Number that may be set to:
-
0 or
steps.MOVELINES
: the current position is set to the next line. -
1 or
steps.MOVEDELIMITERS
: the current position is set to the next delimiter (as defined in the Input Data settings). -
2 (next line with content): the current position is set to the next line that contains any text.
Example: The following line of code moves the current position to the next line that contains any text.
steps.moveToNext(2);
XML
scope
Number that may be set to:
- 0 or
steps.MOVENODE
: The current position is set to the next node in the XML, regardless of its level in the hierarchy; the next node may be a child element, a sibling node, or a node that is higher in the XML hierarchy than the current node. - 1 or
steps.MOVESIBLING
: the current position is set to the next sibling node in the XML hierarchy.
JSON
Moves the current position to the next element in the JSON hierarchy based on the specified scope.
scope
Number that may be set to:
- 0 or
steps.MOVENODE
: the current position is set to the first available next element element in the JSON. The next element is looked for in the following order: first child, next sibling, parent's sibling. - 1 or
steps.MOVESIBLING
: the current position is set to the next element in the same parent, i.e. the next element in an array or the next key-value pair in an object.
moveToNext(left, right)
Moves the current position in a PDF file to the next line that contains any text, the search for text being contained within the left and right parameters, expressed in millimeters.
left
Double that represents the left edge (in millimeters) of the text to find.
right
Double that represents the right edge (in millimeters) of the text to find.
moveToNext()
Moves the current position in a CSV file to the next row, relative to the current position.