Titanium.XML.NamedNodeMap

Object of Titanium.XML.
Platform Since
Android 0.9
iPhone 0.9
iPad 0.9

Summary

A key-value paired map that maps String objects to Titanium.XML.Node objects. This conforms to the DOM Level 2 defintion of a DOM NamedNodeMap.

Methods

Name Summary
addEventListener

Adds the specified callback as an event listener for the named event.

fireEvent

Fires a synthesized event to any registered listeners.

getLength

Gets the value of the length property.

getNamedItem

Retrieves a node specified by name.

getNamedItemNS

Retrieves a node specified by name and namespace. Returns null if no matching node is in the map.

item

Retrieves the node at the specified index of the map. Note that NamedNodeMaps are not ordered.

removeEventListener

Removes the specified callback as an event listener for the named event.

removeNamedItem

Removes a node from the map specified by name. When this map contains attributes attached to an element, if the removed attribtue is known to have a default, it is replaced with that value.

removeNamedItemNS

Removes a node from the map specified by local name and namespace URI. When this map contains attributes attached to an element, if the removed attribtue is known to have a default, it is replaced with that value. Returns the node removed from the map, or null if there is no corresponding node.

setNamedItem

Adds a node using its nodeName attribute. If a node with that name is already present, it is replaced. Throws an exception if the argument is from a different document, the map is read-only, or the argument is an attribute of another element.

setNamedItemNS

Adds a node using its namespaceURI and localName attributes. If a node with that name is already present, it is replaced. Throws an exception if the argument is from a different document, the map is read-only, or the argument is an attribute of another element.

Properties

Name Type Summary
length Number

The number of nodes in the map. The valid range of child node indices is 0-length-1, inclusive. read-only

Events

This type has no events.