Skip to main content
All CollectionsStepsReader Steps
XML to JSON Reader Step
XML to JSON Reader Step

The XML to JSON Reader step is used to convert XML files into JSON data.

Praise Magidi avatar
Written by Praise Magidi
Updated over a year ago

Illustrated in the below image is a flow where the XML to JSON reader step is used to read data from an XML file and convert it to JSON data. The filter step is used to filter for specific data requirements and a Buffer destination step to store the data in.

Adding an XML to JSON Reader

To use an XML to JSON Reader step in a flow, please follow the instructions below:

1. Click on the highlighted icon as shown in the below image.

2. The below page will appear. Select or search for a Reader step to pull out the source data. Click on the Reader tab and select XML to JSON as shown in the image below.

Configure an XML to JSON Reader step

The image below illustrates the XML to JSON Reader step.

Attributes field – To name the attributes. By default, it is set to _attributes.

Merge Attributes Checkbox – Merge attributes to an object. The checkbox is selected by default when the XML to JSON Reader step is added.

Ignore Attributes Checkbox – Ignore attributes. The checkbox is selected not by default when the XML to JSON Reader step is added.

Explicit Array Checkbox– Always puts child nodes in an array if true. If not, an array is created only if there is more than one. The checkbox is selected not by default when the XML to JSON Reader step is added.

Auto Convert Numbers Checkbox – Automatically convert XML strings that are numbers to a number in JSON. The checkbox is selected not by default when the XML to JSON Reader step is added.

Set Blanks to null Checkbox – Set blank values to a null value. The checkbox is selected not by default when the XML to JSON Reader step is added.

Conversion Matrix section – Set the conversion that must be applied. The following fields can be set:

  • Field Name column – Name of the field to be converted.

  • Field value column – Value of the field to be converted.

  • To Type column – Field to map the conversion to.

Using an XML to JSON Reader step

To use an XML to JSON Reader step, follow the below instructions:

  1. Click on the play button on the XML to JSON Reader step as highlighted in the image below:

2. Click the highlighted are in the image below to upload an XML file.

3. Click the Test button as shown in the image below.

Did this answer your question?