# XML Transformer

**XML Transformer** transforms a JSON object into an XML string.

## Parameters

Take a look at the configuration options for the component. Parameters supported by [Double Braces expressions](/documentation/connectors-and-triggers/double-braces/overview.md) are marked with `(DB)`.

<table data-full-width="true"><thead><tr><th>Parameter</th><th>Description</th><th>Default value</th><th>Data type</th></tr></thead><tbody><tr><td><strong>Output JSON Property</strong></td><td>Defines the value of the JSON attribute that will receive the XML in the output.</td><td>N/A</td><td>String</td></tr><tr><td><strong>Generate Root Element On XML</strong></td><td>Defines the value of the root element to be added in the generated XML.</td><td>N/A</td><td>String</td></tr></tbody></table>

## Messages flow <a href="#messages-flow" id="messages-flow"></a>

### Input

A JSON object is expected to be converted, provided that the component's parameters are correctly filled in.

### Output

An XML string that is the result of the conversion of the input JSON object.

## XML Transformer in Action

### Input <a href="#input" id="input"></a>

Considering the configurations:

* **Output JSON Property:** output
* **Generate Root Element On XML:** customers

When the following message is received:

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

### Output <a href="#output" id="output"></a>

The following output structure is generated:

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digibee.com/documentation/connectors-and-triggers/connectors/tools/xml-transformer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
