# XML

The XML piece in ZBrain Flow provides data format conversion capabilities, allowing you to transform JSON data into structured XML format directly from your workflows. This connector enables you to prepare data for systems that require XML input without manual formatting or coding. With XML integration, you can build automations that transform API responses, convert data structures, prepare information for legacy systems, and ensure compatibility with XML-based protocols and services. This piece is particularly useful for integrating with older enterprise systems, SOAP web services, or any process that requires XML-formatted data.

### **How to Transform JSON Data to XML Format in ZBrain Flow** <a href="#how-to-transform-json-data-to-xml-format-in-zbrain-flow" id="how-to-transform-json-data-to-xml-format-in-zbrain-flow"></a>

**Step 1: Add XML Converter to Your Flow**

* Click on the '+' button in the Flow and search for XML.
* Select XML.
* Choose the 'Convert JSON to XML' action.

**Step 2: Provide JSON Input**

* In the 'JSON' field, enter the JSON data you want to convert to XML. This can be a static JSON object/array or a variable containing JSON from a previous step.

**Step 3: Configure XML Attributes (Optional)**

* In the 'Attribute field', specify which JSON properties should be treated as XML attributes. This determines how nested properties are structured in the resulting XML.

**Step 4: Set XML Header Options**

* Toggle 'Header' on if you want to include the standard XML declaration line.


---

# 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.zbrain.ai/zbrain-documentation/zbrain-builder/flows/flow-components/xml.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.
