# Titanium.XML.DOMImplementation

The Titanium.XML.DOMImplementation interface provides a number of methods for performing operations that are independent of any particular instance of the document object model.Implements the DOM Level 2 API on Android and iOS.

Availability
1.8.0
1.8.0
9.2.0

# Methods

# createDocument

Availability
1.8.0
1.8.0
9.2.0
createDocument(namespaceURI, qualifiedName, doctype) Titanium.XML.Document

Creates an Titanium.XML.Document object of the specified type with its document element. Raises an exception if qualifiedName is malformed, contains an illegal character, or is inconsistent with namespaceURI. Also raises an exception if doctype has already been used with a different document.

Parameters

Name Type Description
namespaceURI String

The namespace URI of the document element to create.

qualifiedName String

The qualified name of the document element to be created.

doctype Titanium.XML.DocumentType

The type of document to be created or null. When doctype is not null, its Node.ownerDocument attribute is set to the document being created.

Returns

A new Titanium.XML.Document object


# createDocumentType

Availability
1.8.0
1.8.0
9.2.0
createDocumentType(qualifiedName, publicId, systemId) Titanium.XML.DocumentType

Creates an empty Titanium.XML.DocumentType node. Entity declarations and notations are not made available. Entity reference expansions and default attribute additions do not occur. Raises an exception if qualifiedName is malformed or contains an illegal character.

Parameters

Name Type Description
qualifiedName String

The qualified name of the document type to be created.

publicId String

The external subset public identifier.

systemId String

The external subset system identifier.

Returns

A new Titanium.XML.DocumentType node with Node.ownerDocument set to null.


# hasFeature

Availability
1.8.0
1.8.0
9.2.0
hasFeature(feature, version) Boolean

Test if the Titanium.XML.DOMImplementation implements a specific feature.

Parameters

Name Type Description
feature String

The name of the feature to test (case-insensitive). The values used by DOM features are defined throughout the DOM Level 2 specifications and listed in the Conformance section. The name must be an XML name. To avoid possible conflicts, as a convention, names referring to features defined outside the DOM specification should be made unique by reversing the name of the Internet domain name of the person (or the organization that the person belongs to) who defines the feature, component by component, and using this as a prefix. For instance, the W3C SVG Working Group defines the feature "org.w3c.dom.svg".

version String

This is the version number of the feature to test. In Level 2, the string can be either "2.0" or "1.0". If the version is not specified, supporting any version of the feature causes the method to return true.

Returns

true if the feature is implemented in the specified version, false otherwise.

Type
Boolean