# XMLParse

Return new array

## Method Signature

```
XMLParse(XML=[string])
```

### Arguments

| Argument | Type     | Required | Description | Default |
| -------- | -------- | -------- | ----------- | ------- |
| `XML`    | `string` | `false`  |             |         |

## Examples

### Parse XML read from a file

Read XML from a file and use the xmlParse method to parse it into an XML data structure.

```java
<bx:file action="read" file="#tempxml#" variable="xmlString">
<bx:set myXML = xmlParse( xmlString ) >
```

### Additional Examples

[Run Example](https://try.boxlang.io/?code=eJxFjrEOwiAURXe%2B4qVTu8gHFEl0cjRObobKtSXhFQWatH9vgyG%2B6byTO5yV%2FSPlCMN0pEbQfmoOGbrg%2FuSgT949oeROVb5iYH0Og5KFqp5grJtHfQO72SIqWU1dDMFu%2BoIIconyBGKkZEbQFhaK%2BCxIGfagZBn%2BcmTtaXphF363dGd%2FNTGhpfWf31HXiy%2FEgj49)

```java
xml_stream = "
    <note>
      <to>Alice</to>
      <from>Bob</from>
      <heading>Reminder</heading>
      <body>Here is the message you requested.</body>
    </note>
  ";
dump( XmlParse( xml_stream ) );

```

## Related

* [XMLChildPos](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/xml/xmlchildpos)
* [XMLElemNew](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/xml/xmlelemnew)
* [XMLFormat](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/xml/xmlformat)
* [XMLGetNodeType](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/xml/xmlgetnodetype)
* [XMLNew](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/xml/xmlnew)
* [XMLSearch](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/xml/xmlsearch)
* [XMLTransform](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/xml/xmltransform)
* [XMLValidate](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/xml/xmlvalidate)
