You are reading 12.8.0. See this page in 13.4.1.
Titanium.XML.Node
Extends Titanium.Proxy
Extended by Titanium.XML.AttrTitanium.XML.CharacterDataTitanium.XML.DocumentTitanium.XML.DocumentFragmentTitanium.XML.DocumentTypeTitanium.XML.ElementTitanium.XML.EntityTitanium.XML.EntityReference
A single node in the Document tree.
Implements the DOM Level 2 API on Android and iOS.
Note that on iOS, only Element nodes are mutable. This means
that the methods appendChild, insertBefore, removeChild, and
replaceChild only work on Element objects. If one of these methods is called on
another type of node, it throws an exception.
Properties 31
Inherited from Titanium.Proxy
The name of the API that this proxy corresponds to.
Value 2
A map of this node's attributes.
As defined by the DOM specification, only Element nodes have attributes.
For all other node types, this property is always null.
Inherited from Titanium.Proxy
Indicates if the proxy will bubble an event to its parent.
Default: true
Used with nodeType to identify a CDATASection node.
Value 4
A Titanium.XML.NodeList of this node's children.
Value 8
Used with nodeType to identify a DocumentFragment node.
Value 11
Value 9
Used with nodeType to identify a DocumentType node.
Value 10
Value 1
Value 6
Used with nodeType to identify an EntityReference node.
Value 5
This node's first child.
This node's last child.
Inherited from Titanium.Proxy
The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.
localName
StringLocal part of the qualified name of this node.
The local part of the qualified name that comes after the colon. That is, the name without the namespace prefix.
Namespace URI of this node.
This node's next sibling.
Name of this node.
Certain node types have constant values defined by the DOM specification:
- Text node:
#text - Comment node:
#comment - CDATA section node:
#cdata-section - Document node:
#document - Document fragment node:
#document-fragment
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
StringContent (value) of this node.
As defined in the DOM specification, the node value is always null for
Document, DocumentFragment, DocumentType, Element, Entity, EntityReference, and
Notation nodes.
Value 12
This node's owning document.
Note that a node always has an owning document, even if it is not part of the document tree.
For more on node ownership, see ownerDocument issues in the W3C DOM FAQ.
This node's parent node.
prefix
StringNamespace prefix of this node.
Read-only on iOS, read-write on other platforms.
This node's previous sibling.
Used with nodeType to identify a ProcessingInstruction node.
Value 7
Deprecated since 2.0.0
Use Titanium.XML.Node.textContent instead.
Content (value) of all text nodes within this node.
Value 3
Content (value) of all text nodes within this node.
Methods 13
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
|
Appends the node newChild as a child of this node.
On iOS, appendChild is supported on Element
nodes only.
| 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. |
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. |
Returns true if this node has attributes.
True if this node has attributes, false if it does not.
Returns true if this node has child nodes.
True if this node has children, false if it does not.
Inserts the node newChild before the node refChild.
On iOS, insertBefore is supported on Element
nodes only.
| Parameters | Type | Description |
|---|---|---|
| newChild | Titanium.XML.Node | Node to insert. |
| refChild | Titanium.XML.Node | Node to insert |
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
AndroidNormalizes text and attribute nodes in this node's child hierarchy.
Removes a child node from this node.
On iOS, removeChild is supported on Element
nodes only.
| 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
|
Replaces the node oldChild with the node newChild.
On iOS, replaceChild is supported on Element
nodes only.
| Parameters | Type | Description |
|---|---|---|
| newChild | Titanium.XML.Node | New node. |
| oldChild | Titanium.XML.Node | Node being replaced. |