DATA FORMAT Create XML function

The DATA FORMAT Create XML function in RPA.

Help CentreFunctions & Formulas

This article describes the RPA Data Format functionality to create XML from structured data.

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


Description

The Create XML function generates an XML string from structured data (dictionary or list). You can specify the root element tag and the tag to use for list items.


Setting it up

To use the Create XML function, follow these instructions:

{{popups:rpas/add:action=xml-create}}

Once on a process map:

  1. Navigate to the process where you would like to add the Create 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 Create XML option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
Root TagYesText-The tag name for the root XML element
DataYesText-The structured data (dictionary or list) to convert to XML
Row TagNoTextitemThe tag name to use for list items
VariableNoTextxmlVariable name to store the generated XML

Output variables

VariableTypeDescription
{xml}StringThe generated XML string

Errors

ErrorDescription
Invalid dataThe data cannot be converted to XML

Tips

  • Use the row_tag parameter when your data is a list to control the element name for each item
  • Nested dictionaries produce nested XML 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.