XML Transformer

Know the component and how to use it.

Micaella Mazoni avatar
Written by Micaella Mazoni
Updated over a week ago

XML Transformer makes transformation from JSON to XML.

Take a look at the configuration parameters of the component:

  • Output JSON Property: defines the value of the JSON attribute that will receive the XML in the output.

  • Generate Root Element On XML: defines the value of the root element to be added in the generated XML.

Messages flow

Input

Considering the configurations:

  • Generate Root Element On XML: customers

  • Output JSON Property: output

When the following message is received:

{
"customer": {
"id":1,
"name":"Paul"
}
}

Output

The following output structure is generated:

{
"output": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><customers><customer>
<id>1</id><name>Leandro</name></customer></customers>"
}
Did this answer your question?