XML utilities

This topic describes the common XML utilities available with BMC Atrium Orchestrator Content.

Important

The XML utilities are compatible only with BMC Atrium Orchestrator Platform 7.9 and later. On the BMC Atrium Orchestrator peers, the json-20160316j6.jar file is located in the /tomcat/webapps/baocdp/WEB-INF/lib folder. 

Convert JSON to XML

This utility converts JSON to XML. To use this utility, the json.jar file must be installed on your BMC Atrium Orchestrator peers and BMC Atrium Orchestrator Development Studio.

Note

While running the Convert JSON to XML utility, if the conversion does not occur and the workflow returns the same JSON-formatted string, this may be due to an incorrect library function being called. For more information on resolving this issue, see the BMC Knowledge Article 000131175: Atrium Orchestrator's "Convert JSON to XML" workflow returns JSON, not XML. 

Workflow input elements

Input element
Description
Required
JSONSpecifies the JSON to be converted into XMLYes

Workflow output elements

Output element
Description
XMLSpecifies the XML output

Convert XML to JSON

This utility converts XML to JSON. The XML namespaces are striped to be converted to JSON.

Note

For XML with attributes, use the Convert XML Attributes to Elements workflow to convert XML attributes to elements first, and then convert to JSON.

Workflow input elements

Input elementDescriptionRequired
XMLSpecifies the XML to be converted into JSONYes

Workflow output elements

Output elementDescription
JSONSpecifies the JSON output

Convert XML Attributes to Elements

This utility converts XML attributes to elements before converting it to JSON. 

Workflow input elements

Input elementDescriptionRequired
XMLSpecifies the XML whose attributes need to be converted into elementsYes

Workflow output elements

Output elementDescription
XMLNoAttributeSpecifies XML with no attributes

Strip Namespaces

This utility strips namespaces from the XML document. 

Workflow input elements

Input elementDescriptionRequired
XMLSpecifies the XML document from which to strip the namespacesYes

Workflow output elements

Output elementDescription
XMLThe 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 elementDescriptionRequired
XML StringSpecifies the formatted XML stringYes

Workflow output elements

Output elementDescription
XMLThe submitted XML without the XML strings

Create For Loop XML

NEW IN 20.17.01This 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 elementDescriptionRequired
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 elementDescription
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

NEW IN 20.17.01This utility segments a string on a specified delimiter. 

Workflow input elements

Input elementDescriptionRequired
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 elementDescription
XMLContains the XML output

Back to top

Was this page helpful? Yes No Submitting... Thank you

Comments