> For the complete documentation index, see [llms.txt](https://docs.digibee.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digibee.com/documentation/connectors-and-triggers/pt-br/connectors/tools/xml-transformer.md).

# XML Transformer

O **XML Transformer** transforma um objeto JSON em uma *string* XML.

## Parâmetros

Dê uma olhada nas opções de configuração do componente. Parâmetros suportados por [expressões *Double Braces*](/documentation/connectors-and-triggers/pt-br/double-braces/overview.md) estão marcados com `(DB)`.

<table data-full-width="true"><thead><tr><th>Parâmetro</th><th>Descrição</th><th>Valor padrão</th><th>Tipo de dado</th></tr></thead><tbody><tr><td><strong>Output JSON Property</strong></td><td>Define o nome do atributo do JSON de saída que receberá como valor o resultado da transformação para XML.</td><td>N/A</td><td><em>String</em></td></tr><tr><td><strong>Generate Root Element On XML</strong></td><td>Define o valor do elemento <em>root</em> que será adicionado no XML gerado.</td><td>N/A</td><td><em>String</em></td></tr></tbody></table>

## Fluxo de mensagens <a href="#fluxo-de-mensagens" id="fluxo-de-mensagens"></a>

### Entrada <a href="#entrada" id="entrada"></a>

É esperado que um objeto JSON seja transformado, desde que os parâmetros do componente sejam preenchidos corretamente.

### **Saída** <a href="#h_1154f08e69" id="h_1154f08e69"></a>

Uma *string* XML que é o resultado da conversão do objeto JSON de entrada.

## XML Transformer em ação <a href="#h_fd0d375710" id="h_fd0d375710"></a>

### Entrada <a href="#h_fbe63e5574" id="h_fbe63e5574"></a>

&#x20;Considerando as configurações:

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

Quando a seguinte mensagem é recebida:

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

### Saída <a href="#h_84cf6390e0" id="h_84cf6390e0"></a>

A seguinte estrutura de saída é gerada:

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/pt-br/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.
