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: | | Files Tab: | The files tab is where you define the location of the XML files from which you want to read. |

No.Field NameDescription
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:
1SettingsLoop XPath: For 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.

Encoding: the XML filename encoding in case none is specified in the XML documents. (yes, those still exist)

Namespace aware: check this to make the XML document namespace aware.

Ignore comments: Ignore all comments in the XML document while parsing.

Validate XML: Validate the XML prior to parsing. Use a token when you want to replace dynamically in a Xpath field value. A token is between @_ and -(@_fieldname-).

Use token: a token is not related to XML parsing but to Process Studio.

Ignore empty file: an empty file is not a valid XML document. Check this if you want to ignore those altogether.

Do not raise an error if no file: Enable checkbox if you do not want the step to raise an error when no files are found.

Limit: Limits the number of rows to this number (zero (0) means all rows).

Prune path to handle large files: almost 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.

2Additional 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.

3Add 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.
Fields Tab:
1ElementThe element type to read: Node or Attribute
2TypeSpecify the data type to convert to
3FormatSpecify the format or conversion mask to use in the data type conversion
4LengthSpecify the length of the output data type.
5PrecisionSpecify the precision of the output data type
6CurrencySpecify the currency symbol to use during data type conversion.
7DecimalSpecify the numeric decimal symbol to use during data type conversion
8GroupSpecify the numeric grouping symbol to use during data type conversion.
9Trim typeSpecify the type of trimming to use during data type conversion.
10RepeatRepeat the column value of the previous row if the column value is empty (null).