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 Name | Description |
---|---|---|
1 | Step name | Name of the step as it appears in the workflow workspace. This name has to be unique in a single workflow. |
2 | XML 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. |
3 | File or directory | Specify 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. |
4 | Regular expression | Specify the regular expression you want to use to filter the files in the directory specified in the previous option. |
5 | Selected Files | Contains 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. |
6 | Show filename(s)… | Displays a list of all files that will be loaded based on the current selected file definitions. |
Content Tab: | ||
1 | Settings | Loop 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. |
2 | Additional fields | Include 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. |
3 | Add to result filename | Enable 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: | ||
1 | Element | The element type to read: Node or Attribute |
2 | Type | Specify the data type to convert to |
3 | Format | Specify the format or conversion mask to use in the data type conversion |
4 | Length | Specify the length of the output data type. |
5 | Precision | Specify the precision of the output data type |
6 | Currency | Specify the currency symbol to use during data type conversion. |
7 | Decimal | Specify the numeric decimal symbol to use during data type conversion |
8 | Group | Specify the numeric grouping symbol to use during data type conversion. |
9 | Trim type | Specify the type of trimming to use during data type conversion. |
10 | Repeat | Repeat the column value of the previous row if the column value is empty (null). |