Skip to main content
Turns a piece of structured data, such as an object or a list, into a single XML text string. Use this when a system you send data to expects an XML document rather than separate fields. Each field becomes an element, and the whole message is wrapped in one outer element whose name you can choose.

Fields

Sample data

This example formats one object and names the outer element product.
FieldValue
Root element nameproduct
Input:
{
    "product": {
        "sku": "SCARF-01",
        "name": "Wool scarf",
        "price": 24.95
    }
}
Output:
{
    "product": "<?xml version=\"1.0\"?>\n<product><sku>SCARF-01</sku><name>Wool scarf</name><price>24.95</price></product>\n"
}