# 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: 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.workflowgen.com/admin/10.0/workflow-applications/xmltojson.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.
