Help Centre › Functions & 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:
- Navigate to the process where you would like to add the Create XML function
- Click on the green button’s drop-down (right side of the green button labelled “Process”)
- On the menu that appears, click on the “+ Activity” item
- From here you can select the DATA FORMAT Create XML option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Root Tag | Yes | Text | - | The tag name for the root XML element |
| Data | Yes | Text | - | The structured data (dictionary or list) to convert to XML |
| Row Tag | No | Text | item | The tag name to use for list items |
| Variable | No | Text | xml | Variable name to store the generated XML |
Output variables
| Variable | Type | Description |
|---|---|---|
| {xml} | String | The generated XML string |
Errors
| Error | Description |
|---|---|
| Invalid data | The 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