Skip to main content
Roberty Studio
RPAXML

Convert XML to JSON

Convert XML to JSON

Converts a text in the XML format to the JSON format, making it easier to access and handle the data in the following steps of the automation flow.


Options​

XML type text​

Enter the XML content that will be converted to JSON. It can be a fixed text or the result of another action, such as reading a text file.

Returns​

Javascript code​

js
actions["action-id"].value // JSON object equivalent to the XML provided (Any)

Field selection​

  • value — JSON object equivalent to the XML content provided (Any)

Rules and Conditions​

  • The XML type text field is required.
  • The content provided must be a valid and well-formed XML.
  • The JSON returned can be used with the Get property of an object action to access specific fields.
  • In the JSON generated, the attributes of each tag are placed under the $ key and child elements are always returned as lists, even when there is only one — check the return before using it.