DATA FORMAT JSON to XML function

The DATA FORMAT JSON to XML function in RPA.

Help CentreFunctions & Formulas

This article describes the RPA Data Format functionality to convert JSON to XML.

For a full list of available functions, please read DATA FORMAT functions.


Description

The JSON to XML function converts JSON data into an XML string. Nested JSON objects produce nested XML elements.


Setting it up

To use the JSON to XML function, follow these instructions:

{{popups:rpas/add:action=json-to-xml}}

Once on a process map:

  1. Navigate to the process where you would like to add the JSON to XML function
  2. Click on the green button’s drop-down (right side of the green button labelled “Process”)
  3. On the menu that appears, click on the “+ Activity” item
  4. From here you can select the DATA FORMAT JSON to XML option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
DataYesText-The JSON data to convert
Root TagNoTextrootThe tag name for the root XML element
VariableNoTextxmlVariable name to store the XML output

Output variables

VariableTypeDescription
{xml}StringThe generated XML string

Errors

ErrorDescription
Invalid JSONThe data is not valid JSON

Tips

  • Nested JSON objects produce nested XML elements
  • JSON arrays are converted to repeated elements

Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.