XML utilities
This topic describes the common XML utilities available with Content.
Add XML
New in 20.18.01
This utility adds a child XML to a parent XML. This utility does not verify the validity or the accuracy of either of the XMLs. If there's an error in any of the XML, the process fails and goes in a compensated state.
Workflow input elements
Input element | Description | Required |
---|---|---|
parent XML | Specifies the main XML to which you want to merge another XML. | Yes |
child XML | Specifies the child XML to be merged with the parent XML. | Yes |
Workflow output elements
Output element | Description |
---|---|
result XML | Specifies the XML output |
Convert JSON to XML
This utility converts JSON to XML. To use this utility, the json.jar file must be installed on your peers and Development Studio.
Workflow input elements
Input element | Description | Required |
---|---|---|
JSON | Specifies the JSON to be converted into XML | Yes |
Workflow output elements
Output element | Description |
---|---|
XML | Specifies the XML output |
Convert XML to JSON
This utility converts XML to JSON. The XML namespaces are striped to be converted to JSON.
Workflow input elements
Input element | Description | Required |
---|---|---|
XML | Specifies the XML to be converted into JSON | Yes |
Workflow output elements
Output element | Description |
---|---|
JSON | Specifies the JSON output |
Convert XML Attributes to Elements
This utility converts XML attributes to elements before converting it to JSON.
Workflow input elements
Input element | Description | Required |
---|---|---|
XML | Specifies the XML whose attributes need to be converted into elements | Yes |
Workflow output elements
Output element | Description |
---|---|
XMLNoAttribute | Specifies XML with no attributes |
Strip Namespaces
This utility strips namespaces from the XML document.
Workflow input elements
Input element | Description | Required |
---|---|---|
XML | Specifies the XML document from which to strip the namespaces | Yes |
Workflow output elements
Output element | Description |
---|---|
XML | The submitted XML without namespaces |
XML String to XML
This utility strips the XML headers and doctype elements from the XML strings to XML.
Workflow input elements
Input element | Description | Required |
---|---|---|
XML String | Specifies the formatted XML string | Yes |
Workflow output elements
Output element | Description |
---|---|
XML | The submitted XML without the XML strings |
Create For Loop XML
This utility creates a loop that detects the size of the input and parses it in smaller segments, appending the segments together to create a fully-parsed result.
Workflow input elements
Input element | Description | Required |
---|---|---|
loopaccount | Specifies a whole number indicating the number of elements the loop should have For example, | Yes |
root element name | Specifies the name of the root element to be used in the output XML If not specified, a default value of 'loops' is used. | No |
child element name | Specifies the name of the child element to be used in the output XML If not specified, a default value of 'loop' is used. | No |
Workflow output elements
Output element | Description |
---|---|
loop | Specifies an XML document in the following format: <loops> <loop>1</loop> <loop>2</loop> (any number of iterations) </loops> |
String to XML using Delimiter
This utility segments a string on a specified delimiter.
Workflow input elements
Input element | Description | Required |
---|---|---|
string | Specifies a string that contains delimiters such as comma (,), pipe (|), and so on For example, Delimited using commas: a,b,c,d Delimited using pipes: a|b|c|d Delimited using colons: a:b:c:d | Yes |
delimiter | Specifies any set of characters that can be used in a regular expression Tokenization uses the delimiter as a regular expression. You must append a regular expression special character with a backslash. For a list of characters that must be appended with a back slash, see Pattern (Java Platform) . For example, pipe character (|) should be escaped by using two backslash characters like - \| | Yes |
root element name | Specifies the name of the root element to be used in the output XML If not specified, a default value of 'loops' is used. | No |
child element name | Specifies the name of the child element to be used in the output XML If not specified, a default value of 'loop' is used. | No |
Workflow output elements
Output element | Description |
---|---|
XML | Contains the XML output |