> For the complete documentation index, see [llms.txt](https://docs.workflowgen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.workflowgen.com/admin/10.0/workflow-applications/xmltojson.md).

# XMLTOJSON

The **XMLTOJSON** workflow application provides a reliable way to convert structured XML content into equivalent JSON content. This is particularly useful when working with form data, configuration files, or API responses that were originally encoded in XML but need to be consumed in workflows where JSON is the preferred format.

## Parameters

### Required parameters

{% hint style="info" %}
If you're using a string, the  `XML_STRING` parameter is required. If you're using a file, the `XML_FILE` parameter is required.
{% endhint %}

<table><thead><tr><th width="264" valign="top">Name</th><th width="110.076904296875" valign="top">Type</th><th width="108.01141357421875" valign="top">Direction</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><code>XML_STRING</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">The XML string to convert</td></tr><tr><td valign="top"><code>XML_FILE</code></td><td valign="top">FILE</td><td valign="top">IN</td><td valign="top">The XML file to convert</td></tr><tr><td valign="top"><code>REMOVE_DECLARATION</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">Specifies if the XML declaration should be removed from JSON: <code>Y</code> (default) or <code>N</code></td></tr><tr><td valign="top"><code>REMOVE_SCHEMA</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">Specifies if the XML schema should be removed from JSON: <code>Y</code> (default) or <code>N</code></td></tr><tr><td valign="top"><code>INDENT_JSON_OUTPUT</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">Specifies if the JSON output should be indented: <code>Y</code> or <code>N</code> (default)</td></tr><tr><td valign="top"><code>JSON_STRING</code></td><td valign="top">TEXT</td><td valign="top">OUT</td><td valign="top">The JSON output string</td></tr><tr><td valign="top"><code>JSON_FILE</code></td><td valign="top">FILE</td><td valign="top">OUT</td><td valign="top">The JSON output file</td></tr></tbody></table>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.workflowgen.com/admin/10.0/workflow-applications/xmltojson.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
