---
title: XML_PARSE
url: https://www.tines.com/docs/formulas/functions/xml-parse/
kind: formula-function
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/docs/llms.txt) › [Formulas](https://www.tines.com/llm/docs/formulas.md) › [Functions](https://www.tines.com/llm/docs/formulas/functions.md)*

# XML_PARSE

*[View on tines.com](https://www.tines.com/docs/formulas/functions/xml-parse/)*

Takes text containing XML and parses to an object

**Categories:** Data Parsing/Conversion

## Syntax

```
XML_PARSE(text)
```

## Examples

### Example 1

Input:

```json
{
  "my_action": "<message>\n<to>World</to>\n<from>Tines</from>\n<body>Hello World!</body>\n</message>"
}
```

Formula:

```
XML_PARSE(my_action)
```

Output:

```json
{
  "message": {
    "body": "Hello World!",
    "from": "Tines",
    "to": "World"
  }
}
```

## Sample actions

```json
{
  "standardLibVersion": "13",
  "actionRuntimeVersion": "1",
  "agents": [
    {
      "disabled": false,
      "name": "My Action",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": "<message>\n<to>World</to>\n<from>Tines</from>\n<body>Hello World!</body>\n</message>"
      },
      "position": {
        "x": 1470,
        "y": 3390
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    },
    {
      "disabled": false,
      "name": "XML_PARSE",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "xml_parse": "=XML_PARSE(my_action)"
        }
      },
      "position": {
        "x": 1470,
        "y": 3495
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    }
  ],
  "links": [
    {
      "sourceIdentifier": 0,
      "receiverIdentifier": 1
    }
  ],
  "diagramNotes": []
}
```
