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.
The number of characters that are available through data and the substringData method. This may have the value zero, i.e., Titanium.XML.CharacterData may be empty.
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.
As defined in the DOM specification, the node value is always null for
Document, DocumentFragment, DocumentType, Element, Entity, EntityReference, and
Notation nodes.
Append the string to the end of the character data of the node. Upon success, data provides access to the concatenation of data and the string specified. Throws an exception if this node is readonly.
Remove a range of characters from the node. Upon success, data and length reflect the change. Throws an exception if this node is readonly, if offset is negative, offset is beyond the data's length, or if count is negative.
Parameters:
Name
Type
Summary
Optional
offset
Number
The offset from which to start removing.
No
count
Number
The number of characters to delete. If the sum of offset and count exceeds length then all characters from offset to the end of the data are deleted.
Insert a string at the specified offset. Throws an exception if this node is readonly, if offset is negative, or if offset is beyond the data's length.
Replace the characters starting at the specified offset with the specified string. Throws an exception if this node is readonly, if offset is negative, offset is beyond the data's length, or if count is negative.
Parameters:
Name
Type
Summary
Optional
offset
Number
The offset from which to start replacing.
No
count
Number
The number of characters to replace. If the sum of offset and count exceeds length, then all characters to the end of the data are replaced; (i.e., the effect is the same as a remove method call with the same range, followed by an append method invocation).
Extracts a range of data from the node. Throws an exception if offset is negative, offset is beyond the data's length, or if count is negative.
Parameters:
Name
Type
Summary
Optional
offset
Number
Start offset of substring to extract.
No
count
Number
The number of characters units to extract.
No
Returns:String — The specified substring. If the sum of offset and count exceeds the length, then all 16-bit units to the end of the data are returned.
Titanium.XML.Comment
Represents the contents of an XML comment.
Implements the DOM Level 2 API on Android and iOS with some non-standard extensions.
Extends:
Titanium.XML.CharacterData· Since: 0.9, 0.9, 0.9, 9.2.0 · Platforms: android, iphone, ipad, macosProperties #
apiName#
Type:
StringThe 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.ATTRIBUTE_NODE#
Type:
NumberUsed with nodeType to identify an
Attr node.
attributes#
Type:
Titanium.XML.NamedNodeMapA 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.bubbleParent#
Type:
BooleanIndicates 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.
CDATA_SECTION_NODE#
Type:
NumberUsed with nodeType to identify a
CDATASection node.
childNodes#
Type:
Titanium.XML.NodeListA Titanium.XML.NodeList of this node's children.
COMMENT_NODE#
Type:
NumberUsed with nodeType to identify a
Comment node.
data#
Type:
StringThe character data of the node that implements this interface. Throws an exception during setting if this node is readonly.
DOCUMENT_FRAGMENT_NODE#
Type:
NumberUsed with nodeType to identify a
DocumentFragment node.
DOCUMENT_NODE#
Type:
NumberUsed with nodeType to identify a
Document node.
DOCUMENT_TYPE_NODE#
Type:
NumberUsed with nodeType to identify a
DocumentType node.
ELEMENT_NODE#
Type:
NumberUsed with nodeType to identify an
Element node.
ENTITY_NODE#
Type:
NumberUsed with nodeType to identify an
Entity node.
ENTITY_REFERENCE_NODE#
Type:
NumberUsed with nodeType to identify an
EntityReference node.
firstChild#
Type:
Titanium.XML.NodeThis node's first child.
lastChild#
Type:
Titanium.XML.NodeThis node's last child.
length#
Type:
NumberThe number of characters that are available through data and the substringData method. This may have the value zero, i.e., Titanium.XML.CharacterData may be empty.
lifecycleContainer#
Type:
Titanium.UI.Window, Titanium.UI.TabGroupThe 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.
localName#
Type:
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.
namespaceURI#
Type:
StringNamespace URI of this node.
nextSibling#
Type:
Titanium.XML.NodeThis node's next sibling.
nodeName#
Type:
StringName of this node.
Certain node types have constant values defined by the DOM specification:
#text#comment#cdata-section#document#document-fragmentnodeType#
Type:
NumberThis 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#
Type:
StringContent (value) of this node.
As defined in the DOM specification, the node value is always
nullforDocument, DocumentFragment, DocumentType, Element, Entity, EntityReference, and
Notation nodes.
NOTATION_NODE#
Type:
NumberUsed with nodeType to identify a
Notation node.
ownerDocument#
Type:
Titanium.XML.DocumentThis 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.
parentNode#
Type:
Titanium.XML.NodeThis node's parent node.
prefix#
Type:
StringNamespace prefix of this node.
Read-only on iOS, read-write on other platforms.
previousSibling#
Type:
Titanium.XML.NodeThis node's previous sibling.
PROCESSING_INSTRUCTION_NODE#
Type:
NumberUsed with nodeType to identify a
ProcessingInstruction node.
text (deprecated)#
Type:
StringContent (value) of all text nodes within this node.
TEXT_NODE#
Type:
NumberUsed with nodeType to identify a
Text node.
textContent#
Type:
StringContent (value) of all text nodes within this node.
On Android,
textContentis supported on Element andText nodes only.
Methods #
addEventListener #
Adds the specified callback as an event listener for the named event.
nameStringcallbackCallback<Titanium.Event>appendChild #
Appends the node
newChildas a child of this node.On iOS,
appendChildis supported on Elementnodes only.
newChildTitanium.XML.NodeReturns:
Titanium.XML.Node— Newly-appended node.appendData #
Append the string to the end of the character data of the node. Upon success, data provides access to the concatenation of data and the string specified. Throws an exception if this node is readonly.
argStringapplyProperties #
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.
propsDictionarycloneNode #
Returns a duplicate of this node.
deepBooleanReturns:
Titanium.XML.Node— Cloned node.deleteData #
Remove a range of characters from the node. Upon success, data and length reflect the change. Throws an exception if this node is readonly, if offset is negative, offset is beyond the data's length, or if count is negative.
offsetNumbercountNumberfireEvent #
Fires a synthesized event to any registered listeners.
nameStringeventDictionaryhasAttributes #
Returns
trueif this node has attributes.Returns:
Boolean— True if this node has attributes, false if it does not.hasChildNodes #
Returns
trueif this node has child nodes.Returns:
Boolean— True if this node has children, false if it does not.insertBefore #
Inserts the node
newChildbefore the noderefChild.On iOS,
insertBeforeis supported on Elementnodes only.
newChildTitanium.XML.NoderefChildTitanium.XML.NodenewChildbefore.Returns:
Titanium.XML.Node— The inserted node.insertData #
Insert a string at the specified offset. Throws an exception if this node is readonly, if offset is negative, or if offset is beyond the data's length.
offsetNumberargStringisSupported #
Tests whether the DOM implementation supports a specific feature.
featureStringversionStringReturns:
Boolean— True if the feature is supported, false if it is not.normalize #
Normalizes text and attribute nodes in this node's child hierarchy.
removeChild #
Removes a child node from this node.
On iOS,
removeChildis supported on Elementnodes only.
oldChildTitanium.XML.NodeReturns:
Titanium.XML.Node— Node that was removed.removeEventListener #
Removes the specified callback as an event listener for the named event.
Multiple listeners can be registered for the same event, so the
callbackparameter 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:
To remove the listener, pass in a reference to the callback function:
nameStringcallbackCallback<Titanium.Event>addEventListener.replaceChild #
Replaces the node
oldChildwith the nodenewChild.On iOS,
replaceChildis supported on Elementnodes only.
newChildTitanium.XML.NodeoldChildTitanium.XML.NodeReturns:
Titanium.XML.Node— Node that was replaced.replaceData #
Replace the characters starting at the specified offset with the specified string. Throws an exception if this node is readonly, if offset is negative, offset is beyond the data's length, or if count is negative.
offsetNumbercountNumberargStringsubstringData #
Extracts a range of data from the node. Throws an exception if offset is negative, offset is beyond the data's length, or if count is negative.
offsetNumbercountNumberReturns:
String— The specified substring. If the sum of offset and count exceeds the length, then all 16-bit units to the end of the data are returned.