Skip to main content

Get Data from XML

Description:

Get Data from XML is a step in the Input Plugin for Process Studio Workflows. Get Data from XML plugin step can read data from any type of XML file using XPath specifications. Get Data from XML step can read data dynamically from field values in the stream or parameters referring to files or Urls. Secondly, users can also define files as static values.

Configurations:

No.Field NameDescription
Files Tab:The files tab is where you define the location of the XML files from which you want to read.
1Step nameName of the step as it appears in the workflow workspace. This name has to be unique in a single workflow.
2XML Source from field

XML source is defined in a field: XML data source is defined in a field in the input stream.

XML source is a filename: XML data is in a file specified in a field in the input stream.

source as URL: XML data is retrieved from a URL

specified in a field in the input stream.

Get XML source from a field: Choose a field to read XML, filename or URL.

3File or directorySpecify the location and/or name of the input text file or browse for the file.

Note: Click Add to add the file/directory/wildcard combination to the list of selected files (grid) below.

4Regular expressionSpecify the regular expression you want to use to filter the files in the directory specified in the previous option.
5Selected FilesContains a list of selected files (or wildcard selections) and a property specifying if file is required or not. If a file is required and it is not found, an error is generated; otherwise, the file name is skipped.
6Show filename(s)…Displays a list of all files that will be loaded based on the current selected file definitions.
Content Tab:
1Loop XPathFor every "Loop XPath" location we find in the XML file(s), we will output one row of data. This is the main specification we use to flatten the XML file(s). You can use the "Get XPath nodes" button to search for the possible repeating nodes in the XML document. Please note that if the XML document is large that this can take a while.
2EncodingThe XML filename encoding in case none is specified in the XML documents. (yes, those still exist)
3Namespace awareCheck this to make the XML document namespace aware.
4Ignore commentsIgnore all comments in the XML document while parsing.
5Use tokenToken is not related to XML parsing but to Process Studio.
6Ignore empty fileAn empty file is not a valid XML document. Check this if you want to ignore those altogether.
7Do not raise an error if no fileEnable checkbox if you do not want the step to raise an error when no files are found.
8LimitLimits the number of rows to this number (zero (0) means all rows).
9Prune path to handle large filesAlmost the same value as the "Loop XPath" property with some exceptions, see Get Data from XML - Handling Large Files for more details. Note that you can use this parameter to avoid multiple HTTP URL requests.
10Additional fieldsInclude filename in output?: Enable checkbox to allow you to specify a field name to include the file name (String) in the output of this step.

Rownum in output?: Enable checkbox to allow you to specify a field name to include the row number (Integer) in the output of this step.

11Add to result filenameEnable the checkbox to add the XML filenames read to the result of this workflow. Filenames in result is a unique list being kept in memory that can be used in the next steps or parent workflow steps or parent process entries.
Field NameDescription
Fields Tab:
NameSpecify field name in the returned stream
XPathSpecify xpath to extract the file.
ElementSelect the element type to read:
- Node
- Attribute
Result TypeSelect result type from the list:
- Value of
- Single node
TypeSpecify the data type to convert from the list:
- Number
- String
- Date
- Boolean
- Integer
- BigNumber
- Binary
- Timestamp
- Internet Address
FormatSpecify the format or conversion mask to use in the data type conversion
LengthSpecify the length of the output data type
PrecisionSpecify the precision of the output data type
CurrencySpecify the currency symbol to use during data type conversion
DecimalSpecify the numeric decimal symbol to use during data type conversion
GroupSpecify the numeric grouping symbol to use during data type conversion
Trim typeSpecify the type of trimming to use during data type conversion
RepeatRepeat the column value of the previous row if the column value is empty (null)
Get fieldsClick to retrieve the list of fields from the input stream(s).