> For the complete documentation index, see [llms.txt](https://docs.coherent.global/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coherent.global/assistant/custom-functions/xcall-legacy-functions/jsontoxml.md).

# JSONTOXML

Converts an valid JSON string into XML and returns it as string.

Syntax: `CS.SPARK_JSONTOXML(cellAddressOrValue)`

Convert a JSON string into XML and return it as string.

| Parameter               | Description                                                       |
| ----------------------- | ----------------------------------------------------------------- |
| `cellAddressOrValue` \* | Either the address of the cell that contains JSON or JSON string. |

## Example

Copy the example JSON data below and paste it into the cell `A1` of a new worksheet.

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "note": {
        "to": "Tove",
        "from": "Jani",
        "heading": "Reminder",
        "body": "Don't forget me this weekend!"
    }
}
</code></pre>

Paste the custom function below and paste it into `A2`:

```excel-formula
=CS.SPARK_JSONTOXML(A1)
```

You should get the following result:

```xml
<note>
    <to>Tove</to>
    <from>Jani</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend!</body>
</note>
```

## Sample file

{% file src="/files/Jrzt7oCDSGuF0OEtSNsO" %}
