Split XML
Allows to split one XML file to multiple XML files based on XPath.
Json
Example
json
{
"name": "file-transformation-split-xml",
"taskReferenceName": "split_xml",
"description": "The business description of the task",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"mode": "FILE",
"file": "${previous_taskReferenceName.output.file}",
"xpath": "/Table/Items/Item",
"fileName": "product.xml"
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
Definition
Property | Type | Required | Description |
---|---|---|---|
The name (or type) of the task | |||
The unique name of the task in your job. It is used to reference this task in the workflow. | |||
The functional description of this task in your job. | |||
The type of the task. It must be SUB_WORKFLOW . | |||
true : the job continues if there is an error on this task. false : the job fails. | |||
Input parameters of the task. See below |
Inputs
Property | Description |
---|---|
mode | Enum FILE | FILES . |
file | A valid input. It can reference the output of a previous task, example: ${previous_taskReferenceName.output.file} , or a static file, example: file://assets/file.xml , or a user input, example: ${workflow.input.input_key} . |
files | A valid input. It can reference the output of a previous task, example: ${previous_taskReferenceName.output.files} , or a user input, example: ${workflow.input.input_key} . |
xpath | The XPath, must starts with / |
fileName | The output file name. Must ends with .xml. Suffix will be automatically added: -1 -2 -3... |
Outputs
Property | Type | Description |
---|---|---|
files | An array of XML files. | |
listing | An xml file representing the list of the temporary files. | |
allFilesGenerated | YES | NO . YES : all files have been generated successfully. NO : at least one file has not been transformed. |
Output listing
Example
xml
<Files>
<File>
<Url>https://app.product-live.com/files-data-factory/d05a74cf11788d8f3ae9bf0e0e028dde66g0c83005c5e0d1211b0069945c0c11</Url>
<File-Name>product-1.xml</File-Name>
</File>
<File>
<Url>https://app.product-live.com/files-data-factory/d25a74cg11788d8f3ae9bf0e0e028dde66g0c83005c5e0d1211b0069945c0c11</Url>
<File-Name>product-2.xml</File-Name>
</File>
</Files>
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
Limits and additional notes
- The limitation of files created is 50.