XML to JSON
With this node you can interpret XML data and convert it to a JSON object.
It has the following configuration options:
- XML Data Type: here you can define how the contents of the XML Data parameter should
be interpreted. Options:
- Auto detect: if you select this option, the content of the XML data parameter will be detected automatically.
- XML data (from other node): if you select this option, the content of the XML data parameter will be used as XML data.
- XML string: if you select this option, the content of the XML data parameter will be used as an XML string.
- URL reference: if you select this option, the content of the XML data parameter will be used as an URL reference.
- XML Data: here you can specify the XML data. Select the pencil to open Expression Builder.Options:
- XML data generated by a previous node.
- XML in a string.
- an URL reference to a XML file.
Note: See also XML Data Type. - XML Template Type: here you can define how to interpret the XML template field.
Options:
- Auto detect: if you select this option, the data are interpreted as an asset in case of a CLOUDFLOW or file URL. If it is not a URL, the data is interpreted as XML data.
- XML Data: if you select this option, the data is always interpreted as XML data.
- Cloudflow or file URL: if you select this option, the data is always interpreted as a URL.
- No Template: if you select this option, the XML is interpreted without using a template.
- XML Template: here you can enter the XML template; or a CLOUDFLOW or file URL to an asset containing the template.
- Allow Incomplete Template: if you leave this checkbox unselected, the XML to JSON node will only process XML data that fully matches the template. If you select this checkbox, the node will process XML data that contains data which is not defined in the template. In this case, undefined data is ignored.
- Strip White space: if you select this checkbox, white spaces are stripped.
- Store result in variable: if you select this checkbox, the resulting JSON data is stored in a variable. If you do not select it, the data is stored in a data container.
- Result variable name: here you can define the variable into which the results are put in case you have selected the checkbox Store result in variable.
- Output: here you can specify the output path of the JSON data in case you have not
selected the checkbox Store result in variable. Options:
- If you leave this field blank, the data will be sent to a container in the database and no physical file will be created.
- If you define an absolute CLOUDFLOW URL containing a filename
(
cloudflow://...
, see Server URL for more information), an output file with the specified file name will be written in the specified folder. - If you define an absolute CLOUDFLOW URL without a filename
(
cloudflow://...
, see Server URL for more information), an output file with the original file name will be written in the specified folder. - If you enter a relative path containing a file name, an output file with the specified file name will be written in the specified folder based on the original input folder.
- If you enter a relative path without a file name, an output file with the original file name will be written in the specified folder based on the original input folder.
- Overwrite existing file: if you select this checkbox, files that already exist will be overwritten. If you leave this checkbox unselected, existing files will not be overwritten and an error is displayed.
Note: Update
Be sure to update this node and its XML template regularly.