You are reading 12.5.1. See this page in 13.4.1.
Titanium.XML.Element
Extends Titanium.XML.NodeTitanium.Proxy
Represents an element in a DOM document, a Titanium.XML.Node defined by a start-tag and end-tag (or an empty tag). Elements may have attributes associated with them. Implements the DOM Level 2 API on Android and iOS with some non-standard extensions.
Properties 32
Inherited from Titanium.Proxy
The name of the API that this proxy corresponds to.
Inherited from Titanium.XML.Node
Value 2
Inherited from Titanium.XML.Node
A map of this node's attributes.
Inherited from Titanium.Proxy
Indicates if the proxy will bubble an event to its parent.
Default: true
Inherited from Titanium.XML.Node
Used with nodeType to identify a CDATASection node.
Value 4
Inherited from Titanium.XML.Node
A Titanium.XML.NodeList of this node's children.
Inherited from Titanium.XML.Node
Value 8
Inherited from Titanium.XML.Node
Used with nodeType to identify a DocumentFragment node.
Value 11
Inherited from Titanium.XML.Node
Value 9
Inherited from Titanium.XML.Node
Used with nodeType to identify a DocumentType node.
Value 10
Inherited from Titanium.XML.Node
Value 1
Inherited from Titanium.XML.Node
Value 6
Inherited from Titanium.XML.Node
Used with nodeType to identify an EntityReference node.
Value 5
Inherited from Titanium.XML.Node
This node's first child.
Inherited from Titanium.XML.Node
This node's last child.
Inherited from Titanium.Proxy
The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.
localName
StringInherited from Titanium.XML.Node
Local part of the qualified name of this node.
Inherited from Titanium.XML.Node
Namespace URI of this node.
Inherited from Titanium.XML.Node
This node's next sibling.
Inherited from Titanium.XML.Node
Name of this node.
Inherited from Titanium.XML.Node
This node's type. One of ELEMENT_NODE, ATTRIBUTE_NODE, TEXT_NODE, CDATA_SECTION_NODE,
ENTITY_REFERENCE_NODE, ENTITY_NODE, PROCESSING_INSTRUCTION_NODE, COMMENT_NODE,
DOCUMENT_NODE, DOCUMENT_TYPE_NODE, DOCUMENT_FRAGMENT_NODE, NOTATION_NODE.
nodeValue
StringInherited from Titanium.XML.Node
Content (value) of this node.
Inherited from Titanium.XML.Node
Value 12
Inherited from Titanium.XML.Node
This node's owning document.
Inherited from Titanium.XML.Node
This node's parent node.
prefix
StringInherited from Titanium.XML.Node
Namespace prefix of this node.
Inherited from Titanium.XML.Node
This node's previous sibling.
Inherited from Titanium.XML.Node
Used with nodeType to identify a ProcessingInstruction node.
Value 7
The name of the element, as defined by its tag.
Deprecated since 2.0.0
Use Titanium.XML.Element.textContent instead.
Content (value) of all text nodes within this node.
Inherited from Titanium.XML.Node
Value 3
Content (value) of all text nodes within this node.
Methods 28
Inherited from Titanium.Proxy
Adds the specified callback as an event listener for the named event.
| Parameters | Type | Description |
|---|---|---|
| name | String | Name of the event. |
| callback | Callback<Titanium.Event> | Callback function to invoke when the event is fired. 4 fields
|
Inherited from Titanium.XML.Node
Appends the node newChild as a child of this node.
| Parameters | Type | Description |
|---|---|---|
| newChild | Titanium.XML.Node | New node to append. |
applyProperties
since 3.0.0Inherited from Titanium.Proxy
Applies the properties to the proxy.
| Parameters | Type | Description |
|---|---|---|
| props | Dictionary | A dictionary of properties to apply. |
Inherited from Titanium.XML.Node
Returns a duplicate of this node.
| Parameters | Type | Description |
|---|---|---|
| deep | Boolean | Whether or not to perform a deep copy of this node. |
Inherited from Titanium.Proxy
Fires a synthesized event to any registered listeners.
| Parameters | Type | Description |
|---|---|---|
| name | String | Name of the event. |
| event? | Dictionary | A dictionary of keys and values to add to the Titanium.Event object sent to the listeners. |
Retrieves an attribute value by name, returning it as a string.
| Parameters | Type | Description |
|---|---|---|
| name | String | The name of the attribute |
The Titanium.XML.Attr value as a string, or empty string if the attribute has no specified or default value.
Retrieves an attribute value by name, returning it as a Titanium.XML.Attr object.
| Parameters | Type | Description |
|---|---|---|
| name | String | The name of the attribute |
Retrieves an attribute value by local name and namespace URI, returning it as a Titanium.XML.Attr object.
| Parameters | Type | Description |
|---|---|---|
| namespaceURI | String | The namespace URI of the attribute to retrieve. |
| localName | String | The local name of the attribute to retrieve. |
Retrieves an attribute value by local name and namespace URI, returning it as a string.
| Parameters | Type | Description |
|---|---|---|
| namespaceURI | String | The namespace URI of the attribute to retrieve. |
| localName | String | The local name of the attribute to retrieve. |
The Titanium.XML.Attr value as a string, or empty string if the attribute has no specified or default value.
Retrieves a Titanium.XML.NodeList of all descendant elements with a given tag name, in preorder traversal.
| Parameters | Type | Description |
|---|---|---|
| name | String | The name of the element. The value |
Retrieves a Titanium.XML.NodeList of all descendant elements with a given local name and namespace URI, in preorder traversal.
| Parameters | Type | Description |
|---|---|---|
| namespaceURI | String | The namespace URI of the element. The value |
| localName | String | The local name of the element. The value |
Determines whether or not an attribute with the given name is available in the element, or has a default value.
| Parameters | Type | Description |
|---|---|---|
| name | String | The name of the attribute to search for. |
Determines whether or not an attribute with the given name is available in the element, or has a default value.
| Parameters | Type | Description |
|---|---|---|
| namespaceURI | String | The namespace URI of the attribute to search for. |
| localName | String | The local name of the attribute to search for. |
Inherited from Titanium.XML.Node
Returns true if this node has attributes.
True if this node has attributes, false if it does not.
Inherited from Titanium.XML.Node
Returns true if this node has child nodes.
True if this node has children, false if it does not.
Inherited from Titanium.XML.Node
Inserts the node newChild before the node refChild.
| Parameters | Type | Description |
|---|---|---|
| newChild | Titanium.XML.Node | Node to insert. |
| refChild | Titanium.XML.Node | Node to insert |
Inherited from Titanium.XML.Node
Tests whether the DOM implementation supports a specific feature.
| Parameters | Type | Description |
|---|---|---|
| feature | String | Name of the feature. |
| version | String | Version number of the feature. |
True if the feature is supported, false if it is not.
normalize
AndroidInherited from Titanium.XML.Node
Normalizes text and attribute nodes in this node's child hierarchy.
Removes an attribute by name. If the attribute has a default value, it is immediately replaced with this default, including namespace URI and local name. Throws an exception if the element is read-only.
| Parameters | Type | Description |
|---|---|---|
| name | String | The name of the attribute to remove. |
Removes the specified attribute node. If the removed attribute has a default value, it is replaced immediately, with the same namespace and local name as the removed attribute, if applicable. Throws an exception if the element is read-only, or the attribute is not an attribute of the element.
| Parameters | Type | Description |
|---|---|---|
| oldAttr | Titanium.XML.Attr | The attribute to remove. |
Removes an attribute by local name and namespace URI. If the attribute has a default value, it is immediately replaced with this default, including namespace URI and local name. Throws an exception if the element is read-only.
| Parameters | Type | Description |
|---|---|---|
| namespaceURI | String | The namespace URI of the attribute to remove. |
| localName | String | The local name of the attribute to remove. |
Inherited from Titanium.XML.Node
Removes a child node from this node.
| Parameters | Type | Description |
|---|---|---|
| oldChild | Titanium.XML.Node | Node to remove. |
Inherited from Titanium.Proxy
Removes the specified callback as an event listener for the named event.
| Parameters | Type | Description |
|---|---|---|
| name | String | Name of the event. |
| callback | Callback<Titanium.Event> | Callback function to remove. Must be the same function passed to 4 fields
|
Inherited from Titanium.XML.Node
Replaces the node oldChild with the node newChild.
| Parameters | Type | Description |
|---|---|---|
| newChild | Titanium.XML.Node | New node. |
| oldChild | Titanium.XML.Node | Node being replaced. |
Adds a new attribute. Any attribute with the same name is replaced. Throws an exception if the element is read-only, or if the name contains an illegal character.
| Parameters | Type | Description |
|---|---|---|
| name | String | The name of the attribute. |
| value | String | The value of the attribute. This is value is not parsed as part of the assignment. Any markup is treated as literal text, and needs to be escaped. |
Adds a new attribute. Any attribute with the same nodeName as the argument is replaced. Throws an exception if the element is read-only, if newAttr is from a different document, or if newAttr is already an attribute of another element.
| Parameters | Type | Description |
|---|---|---|
| newAttr | Titanium.XML.Attr | The attribute node to add to the element. |
Adds a new attribute. Any attribute with the same local name and namespace URI is replaced. Throws an exception if the element is read-only, if newAttr is from a different document, or if newAttr is already an attribute of another element.
| Parameters | Type | Description |
|---|---|---|
| newAttr | Titanium.XML.Attr | The attribute node to add to the element. |
Adds a new attribute. Any attribute with the same local name and namespace URI is present on the element is replaced, with its prefix changed to that of the qualifiedName parameter. Throws an exception if the element is read-only, if the name contains an illegal character, or if the qualified name contains an error.
| Parameters | Type | Description |
|---|---|---|
| namespaceURI | String | The namespace URI of the attribute. |
| qualifiedName | String | |
| value | String | The value of the attribute. This is value is not parsed as part of the assignment. Any markup is treated as literal text, and needs to be escaped. |