# Titanium.XML

> The top level XML module. The XML module is used for parsing and processing XML-based content.

- Source: https://titaniumsdk.com/docs/sdk/13.0.0/Titanium.XML
- Titanium SDK version: 13.0.0
- Kind: module
- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK Android 0.9, iPhone 0.9, iPad 0.9, macOS 9.2.0
- Extends: Titanium.Module
- Inheritance: Titanium.Module > Titanium.Proxy

The API for this module is based on the W3C DOM specification.

Android and iOS implement the [DOM Level 2](https://www.w3.org/TR/DOM-Level-2-Core/core.html) specification
with some non-standard extensions, which are documented in the appropriate places.

Both iOS and Android lack DTD support.

## Methods

### parseString

- Platforms: Android, iPhone, iPad, macOS

Parses an XML string into a [Titanium.XML.Document](https://titaniumsdk.com/docs/sdk/Titanium.XML.Document.md) object.

Throws an exception if the string can't be parsed into a valid document.

Parameters:

- `xml` (String): XML content as a string.

Returns: Titanium.XML.Document

### serializeToString

- Platforms: Android, iPhone, iPad, macOS

Serializes a [Node](https://titaniumsdk.com/docs/sdk/Titanium.XML.Node.md) object into a string.

Parameters:

- `node` (Titanium.XML.Node): XML [Node](https://titaniumsdk.com/docs/sdk/Titanium.XML.Node.md) to serialize.

Returns: String

## Inherited members

7 members are inherited. Each is documented on the type that declares it.

- [Titanium.Proxy](https://titaniumsdk.com/docs/sdk/13.0.0/Titanium.Proxy.md): `addEventListener`, `apiName`, `applyProperties`, `bubbleParent`, `fireEvent`, `lifecycleContainer`, `removeEventListener`

---

- This corpus documents Titanium SDK 13.4.1. Anything here that does not name a version describes 13.4.1.
- Titanium is maintained by TiDev. The Appcelerator toolchain is retired: there is no `appc` CLI, no Appcelerator Studio and no hosted build service. The supported CLI is `titanium` on npm, invoked as `ti`.

