younifyd
Menu

JSON to XML

Convert JSON to XML

Use it in a workflow

  1. Add a step and choose the Data Converter connector.
  2. Pick the JSON to XML action (under helper).
  3. Fill in the fields below, then reference the result from later steps as {{jsonToXml.response.data}}.

Fields

contentstringrequired

The JSON to convert, as text or data from a previous step, e.g. {{getOrder.response.data}}.

inputEncodingstring

Choose base64 for content from the FTP, SFTP or File connectors.

One oftextbase64Default "text"

rootElementstring

The outer element, used when the data doesn't already have a single top-level key.

Default "root"

itemElementstring

The element each entry of a top-level list becomes.

Default "item"

attributePrefixstring

XML attributes appear as keys with this prefix, e.g. @_id.

Default "@_"

xmlDeclarationboolean

Start with <?xml version="1.0" encoding="UTF-8"?>.

Default true

prettyboolean

Indent the output.

Default true

returnAsstring

text: the converted text. base64: for uploading with FTP, SFTP or File.

One oftextbase64Default "text"

Examples

JSON to XML

Convert JSON to XML

json
{
  "content": "{{getOrder.response.data}}",
  "rootElement": "Order"
}

Need more? See the Data Converter guide for connection setup and behaviour shared by every action.

Was this page helpful?
JSON to XML — Data Converter — Documentation