Each Titanium.XML.Document has a doctype
attribute whose value is either 'null' or a Titanium.XML.DocumentType object.
This provides an interface to the list of entities that are defined for the document. Implements the DOM Level 2 API on Android and iOS.
As of version 3.1, Android still does not truly support DTDs. A document with a DTD can be parsed, however it is not validated, none of its default attributes will automatically be put into the tree, etc. Google is aware of the issue.
Used with nodeType to identify a CDATASection node.
Constant value:4
Used with nodeType to identify a DocumentFragment node.
Constant value:11
Used with nodeType to identify a DocumentType node.
Constant value:10
Used with nodeType to identify an EntityReference node.
Constant value:5
Used with nodeType to identify a ProcessingInstruction node.
Constant value:7
The name of the API that this proxy corresponds to.
The name of the API that this proxy corresponds to.
The value of this property is the fully qualified name of the API. For example, Button
returns Ti.UI.Button
.
A map of this node's attributes.
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
.
Indicates if the proxy will bubble an event to its parent.
Some proxies (most commonly views) have a relationship to other proxies, often established by the add() method. For example, for a button added to a window, a click event on the button would bubble up to the window. Other common parents are table sections to their rows, table views to their sections, and scrollable views to their views. Set this property to false to disable the bubbling to the proxy's parent.
Default: true
A Titanium.XML.NodeList of this node's children.
A Titanium.XML.NodeList of this node's children.
A Titanium.XML.NamedNodeMap containing the general entities, both external and internal, declared in the DTD. Parameter entities are not contained. Duplicates are discarded.
The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.
The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.
If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks will also be called on the proxy. Proxies that require the activity lifecycle will need this property set to the appropriate containing Window or TabGroup.
Local part of the qualified name of this node.
Local 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.
The name of DTD; i.e., the name immediately following the DOCTYPE
keyword.
The name of DTD; i.e., the name immediately following the DOCTYPE
keyword.
Name of this node.
Name of this node.
Certain node types have constant values defined by the DOM specification:
text
#comment
#cdata-section
#document
#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
.
Content (value) of this node.
Content (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.
A Titanium.XML.NamedNodeMap containing the notations declared in the DTD. Duplicates are discarded. Every node in this map also implements the Titanium.XML.Notation interface.
This node's owning document.
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.
Namespace prefix of this node.
Namespace prefix of this node.
Read-only on iOS, read-write on other platforms.
This node's previous sibling.
This node's previous sibling.
The public identifier of the external subset.
The public identifier of the external subset.
The system identifier of the external subset.
The system identifier of the external subset.
Content (value) of all text nodes within this node.
deprecated since 2.0.0
Use <Titanium.XML.Node.textContent> instead.
Adds the specified callback as an event listener for the named event.
Name of the event.
Callback function to invoke when the event is fired.
Appends the node newChild
as a child of this node.
On iOS, appendChild
is supported on Element
nodes only.
New node to append.
Newly-appended node.
Applies the properties to the proxy.
Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that myproxy[key] = value.
A dictionary of properties to apply.
Returns a duplicate of this node.
Whether or not to perform a deep copy of this node.
Cloned node.
Fires a synthesized event to any registered listeners.
Name of the event.
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.
Node to insert.
Node to insert newChild
before.
The inserted node.
Tests whether the DOM implementation supports a specific feature.
Name of the feature.
Version number of the feature.
True if the feature is supported, false if it is not.
Normalizes 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.
Node to remove.
Node that was removed.
Removes the specified callback as an event listener for the named event.
Multiple listeners can be registered for the same event, so the
callback
parameter is used to determine which listener to remove.
When adding a listener, you must save a reference to the callback function in order to remove the listener later:
var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);
To remove the listener, pass in a reference to the callback function:
window.removeEventListener('click', listener);
Name of the event.
Callback function to remove. Must be the same function passed to addEventListener
.
Replaces the node oldChild
with the node newChild
.
On iOS, replaceChild
is supported on Element
nodes only.
New node.
Node being replaced.
Node that was replaced.
Sets the value of the bubbleParent property.
New value for the property.
Sets the value of the lifecycleContainer property.
New value for the property.