Know the component and how to use it.
XML Transformer transforms a JSON object into a XML string.
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.
A JSON object is expected to be converted, provided that the component's parameters are correctly filled in.
An XML string that is the result of the conversion of the input JSON object.
Considering the configurations:
- Output JSON Property: output
- Generate Root Element On XML: customers
When the following message is received:
The following output structure is generated:
"output": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><customers><customer>