XML Module
Definition
The XML tool module, standard module for use in any flow, was created to convert data from the XML file format to JSON and vice versa.
The XML module consists of two operations, Convert XML to JSON and Convert JSON to XML.
Configuring the XML module
The XML module appears in the Tools option when editing a flow. When added to the flow, it offers two operations:
Convert XML to JSON: converts an XML spreadsheet to JSON format.
Convert JSON to XML: converts a spreadsheet in JSON to XML format

Convert XML to JSON operation
This operation allows you to convert an XML table with different items (products, customers, etc.) into JSON format, so that this information can be used later in the flow.
To use this option, choose "Convert XML to JSON" and then click "Save".
To configure the variables, click on "Edit" in the newly created component.

Where:
XML: enter the code in XML format that needs to be converted
Attribute symbol: enter the desired symbol for the JSON code; by default, "$" (dollar sign) is used
Character symbol: enter the desired symbol for the JSON code; by default, "_" (underline) is used.
XML CONVERTED TO JSON: here, after you click on the Validate button, the XML converted to JSON format will be displayed
XML example:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<element>
<id>1</id>
<name>Jaleco</name>
<description>Jaleco de alta qualidade fabricado para atender aos clientes mais exigentes</description>
<price>R$ 999,99</price>
<available>true</available>
</element>
<element>
<id>2</id>
<name>Avental</name>
<description>Jaleco de alta qualidade fabricado para atender aos clientes mais exigentes</description>
<price>R$ 999,99</price>
<available>true</available>
</element>
<element>
<id>3</id>
<name>Touca</name>
<description>Jaleco de alta qualidade fabricado para atender aos clientes mais exigentes</description>
<price>R$ 999,99</price>
<available>true</available>
</element>
<element>
<id>4</id>
<name>Fronha</name>
<description>Jaleco de alta qualidade fabricado para atender aos clientes mais exigentes</description>
<price>R$ 999,99</price>
<available>true</available>
</element>
<element>
<id>5</id>
<name>Embalagem</name>
<description>Jaleco de alta qualidade fabricado para atender aos clientes mais exigentes</description>
<price>R$ 999,99</price>
<available>true</available>
</element>
<element>
<id>6</id>
<name>Porta talher</name>
<description>Jaleco de alta qualidade fabricado para atender aos clientes mais exigentes</description>
<price>R$ 999,99</price>
<available>true</available>
</element>
<element>
<id>7</id>
<name>Porta absorvente</name>
<description>Jaleco de alta qualidade fabricado para atender aos clientes mais exigentes</description>
<price>R$ 999,99</price>
<available>true</available>
</element>
</root>
Convert JSON to XML operation
This operation allows you to convert a JSON table with different items (products, customers, etc.) into XML format, so that this information can be used later in the flow.
To use this option, choose "Convert JSON to XLM" and then click "Save".
To configure the variables, click on "Edit" in the newly created component.

Where:
Attribute symbol: enter the desired symbol for the JSON code; by default, "$" (dollar sign) is used.
Character symbol: enter the desired symbol for the JSON code; by default, "_" (underline) is used.
JSON: enter the code in JSON format that needs to be converted
JSON CONVERTED TO XML: here, after you click on the "Validate" button, the JSON converted to XML format will be displayed.
JSON example:
[
{
"id":1,
"name":"Jaleco",
"description":"Jaleco de alta qualidade fabricado para atender aos clientes mais exigentes",
"price":"R$ 999,99",
"available":true
},
{
"id":2,
"name":"Avental",
"description":"Jaleco de alta qualidade fabricado para atender aos clientes mais exigentes",
"price":"R$ 999,99",
"available":true
},
{
"id":3,
"name":"Touca",
"description":"Jaleco de alta qualidade fabricado para atender aos clientes mais exigentes",
"price":"R$ 999,99",
"available":true
},
{
"id":4,
"name":"Fronha",
"description":"Jaleco de alta qualidade fabricado para atender aos clientes mais exigentes",
"price":"R$ 999,99",
"available":true
},
{
"id":5,
"name":"Embalagem",
"description":"Jaleco de alta qualidade fabricado para atender aos clientes mais exigentes",
"price":"R$ 999,99",
"available":true
},
{
"id":6,
"name":"Porta talher",
"description":"Jaleco de alta qualidade fabricado para atender aos clientes mais exigentes",
"price":"R$ 999,99",
"available":true
},
{
"id":7,
"name":"Porta absorvente",
"description":"Jaleco de alta qualidade fabricado para atender aos clientes mais exigentes",
"price":"R$ 999,99",
"available":true
}
]
To finish configuring the module, click on "Save".
Parameters
Each operation has its own parameter, which corresponds to the product of the conversion: JSON for the Convert XML to JSON operation and XML for the Convert JSON to XML operation. When used, they produce the resulting code, which can later be manipulated by the Data Transformation module or by using a SMOP.
Both parameters will appear on the left-hand side of the configuration modal for each operation in the flow, as long as the operations are all connected by lines in the flow.
Last updated