XML Helper
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
The XML Helper converts XML to dictionaries or vice versa. It connects XML-based APIs to the integration platform.
To convert a dictionary to XML, e.g. for use in the REST helper, use the Convert dictionary to XML action. Just reference the object directly, without {{ }}
If you want to include XML attributes in the outputted XML, e.g.:
<?xml version="1.0" encoding="utf-8"?>
<Example id="somevalue" type="text">
<Content>Some Text</Content>
</Example>
You need to include the attributes in the dictionary with an @
prefix, e.g.:
{
"Example": {
"@id": "somevalue",
"@type": "text",
"Content": "Some Text",
}
}
To retrieve an XML file or endpoint, just include the internal Locoia reference or the external URL, like in the below screenshot the VAT-ID check of the EU commission.
Sometimes you may want to drop the namespaces of an existing XML. This can be done with the Drop Namespaces action.