---
title: "XML"
description: "Static XML related functions."
canonical_url: "https://www.zeyos.com/zymba/ref/xml"
markdown_url: "https://www.zeyos.com/ai/guide/zymba/ref/xml.md"
section: "zymba-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/zymbaref.json"
source_sha256: "05a361c6ddc32e74f4a6dc16fd06f218210ff1b7ce57f26ca1994bfffc407915"
---

# XML

## XML

```
object @XML() {
	createFromTree(object $tree): string {}
	escape(string $string): string {}
	parse(string $document, ?function $callback_open, ?function $callback_close, ?function $callback_cdata, ?object $bind, bool $preservecase) {}
	parseToTree(string $document, bool $preservecase): object {}
	unescape(string $string): string {}
}
```

**Static XML related functions.**

## Functions


### `@XML.createFromTree()`


```code
@XML.createFromTree(object $tree): string
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| tree | `object`  |  | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `string` |  |




### `@XML.escape()`


```code
@XML.escape(string $string): string
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| string | `string`  |  | "" |

##### Returns

| Type | Value |
| --- | ---  |
| `string` |  |




### `@XML.parse()`


```code
@XML.parse(string $document, ?function $callback_open, ?function $callback_close, ?function $callback_cdata, ?object $bind, bool $preservecase): void
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| document | `string`  |  | "" |
| callback_open | `?function`  |  | null |
| callback_close | `?function`  |  | null |
| callback_cdata | `?function`  |  | null |
| bind | `?object`  |  | null |
| preservecase | `bool`  |  | false |




### `@XML.parseToTree()`


```code
@XML.parseToTree(string $document, bool $preservecase): object
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| document | `string`  |  | "" |
| preservecase | `bool`  |  | false |

##### Returns

| Type | Value |
| --- | ---  |
| `object` |  |




### `@XML.unescape()`


```code
@XML.unescape(string $string): string
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| string | `string`  |  | "" |

##### Returns

| Type | Value |
| --- | ---  |
| `string` |  |
