2020.2

Table Of Contents
XML File Input Data settings
For an XML file you can either choose to use the root node, or select an element type, to create
a new delimiter every time that element is encountered.
Note
The settings for XML files also apply when extracting data from a JSON file, because
JSONfiles are automatically converted to XML.
l
Use root element: Selects the top-level element. No other boundaries can be set. If there
is only one top-level element, there will only be one record.
l
Use specific element: Displays a list containing all the elements in the XML file.
Selecting an element causes a new page of data to be created every time an instance of
this element is encountered.
Note that higher-level nodes above the selected element are shown, but those below the
selected element are not displayed unless the Show all elements option is checked.
l
Use XPath: Enter an XPath to create a delimiter based on the node name of elements.
For example: ./*[starts-with(name(),'inv')] sets a delimiter after every
element of which the name starts with 'inv'. Note that starts-with() is an XPath
function. For an overview of XPath functions, see Mozilla: XPath Functions.
The XPath may also contain JavaScript code. In order to use JavaScript:
l
The XPath must start with =
l
The entire JavaScript statement must be enclosed in curly brackets: { ... }
l Any other curly brackets that are not part of the JavaScript code must be escaped
with a backslash.
l Single line comments (//...) in the code are not supported.
Note that since the XPath is a string, the return value of the JavaScript statement will be
interpreted as a string.
Note
Currently, XPaths that select elements based on an attribute, attribute value, node
value, node counter or node index are not supported.
Page 321