Package | dom.core |
Interface | public interface NamedNodeMap |
Introduced in: | DOM 1 Core |
Modified in: | DOM 2 Core |
Note: NamedNodeMap objects in the DOM are live.
See also
Property | Defined By | ||
---|---|---|---|
DOM 1 Core length : Number [read-only]
The number of nodes in this map. | NamedNodeMap |
Method | Defined By | ||
---|---|---|---|
Gets a node by name. | NamedNodeMap | ||
Gets a node by namespace and localName. | NamedNodeMap | ||
Returns the attribute with the specified namespace and attribute name. | NamedNodeMap | ||
Returns the item at the given index (or null if the index is higher or equal to the number of nodes). | NamedNodeMap | ||
Returns the next node in the collection. | NamedNodeMap | ||
Removes a node (or if an attribute, may reveal a default if present). | NamedNodeMap | ||
Removes a node (or if an attribute, may reveal a default if present). | NamedNodeMap | ||
Non-Standard reset():void
Resets the iterator. | NamedNodeMap | ||
Adds (or replaces) a node by its nodeName. | NamedNodeMap | ||
Adds (or replaces) a node by its localName and namespaceURI. | NamedNodeMap |
DOM 1 Core length | property |
length:Number
[read-only] Introduced in: | DOM 1 Core |
The number of nodes in this map. The range of valid child node indices is 0 to length-1 inclusive.
public function get length():Number
See also
DOM 1 Core getNamedItem | () | method |
public function getNamedItem(name:DOMString):Node
Introduced in: | DOM 1 Core |
Gets a node by name.
Parameters
name:DOMString — The nodeName of a node to retrieve.
|
Node — A Node (of any type) with the specified nodeName, or null
if it does not identify any node in this map.
|
See also
DOM 2 Core getNamedItemNS | () | method |
public function getNamedItemNS(nameSpaceURI:DOMString, localName:DOMString):Node
Introduced in: | DOM 2 Core |
Gets a node by namespace and localName.
Parameters
nameSpaceURI:DOMString — The namespace URI of the node to retrieve.
| |
localName:DOMString — The local name of the node to retrieve.
|
Node — A Node (of any type) with the specified local name and namespace
URI, or null if they do not identify any node in this map.
|
DOMException — NOT_SUPPORTED_ERR: May be raised if the
implementation does not support the feature "XML" and the language
exposed through the Document does not support XML Namespaces.
|
See also
getQualifiedItem | () | method |
public function getQualifiedItem(baseName:DOMString, nameSpaceURI:DOMString):Node
Non-standard (Microsoft)
Returns the attribute with the specified namespace and attribute name.
Parameters
baseName:DOMString — The string specifying the base name of the attribute, without namespace qualification.
| |
nameSpaceURI:DOMString — The string specifying the namespace prefix that qualifies the attribute name.
|
Node — An object. Returns the attribute node specified by the baseName and namespaceURI parameters.
Returns Null if the attribute is not in the collection or if the item is not an attribute.
|
See also
DOM 1 Core item | () | method |
public function item(index:Number):Node
Introduced in: | DOM 1 Core |
Returns the item at the given index (or null if the index is higher or equal to the number of nodes).
Parameters
index:Number — Index into this map.
|
Node — The node at the index position in the map, or null if that
is not a valid index.
|
See also
nextNode | () | method |
public function nextNode():Node
Non-standard (Microsoft)
Returns the next node in the collection.
Note: The iterator initially points before the first node in the list so that the first call to the nextNode method returns the first node in the list.
Note: This method returns Null when the current node is the last node or there are no items in the list. When the current node is removed from the list, subsequent calls to nextNode return Null. The iterator must be reset by calling the reset method.
ReturnsNode — An IXMLDOMNode, which refers to the next node in the collection. Returns Null if there is no next node.
|
See also
DOM 1 Core removeNamedItem | () | method |
public function removeNamedItem(name:DOMString):Node
Introduced in: | DOM 1 Core |
Removes a node (or if an attribute, may reveal a default if present).
Parameters
name:DOMString — The nodeName of the node to remove.
|
Node — The node removed from this map if a node with such a name exists.
|
DOMException — NOT_FOUND_ERR: Raised if there is no node
named name in this map.
| |
DOMException — NO_MODIFICATION_ALLOWED_ERR: Raised if
this map is readonly.
|
See also
DOM 2 Core removeNamedItemNS | () | method |
public function removeNamedItemNS(nameSpaceURI:DOMString, localName:DOMString):Node
Introduced in: | DOM 2 Core |
Removes a node (or if an attribute, may reveal a default if present).
Parameters
nameSpaceURI:DOMString — The namespace URI of the node to remove.
| |
localName:DOMString — The local name of the node to remove.
|
Node — The node removed from this map if a node with such a local
name and namespace URI exists.
|
DOMException — NOT_FOUND_ERR: Raised if there is no
node with the specified namespaceURI and localName in this map.
| |
DOMException — NO_MODIFICATION_ALLOWED_ERR: Raised
if this map is readonly.
| |
DOMException — NOT_SUPPORTED_ERR: May be raised if
the implementation does not support the feature "XML" and the
language exposed through the Document does not support XML Namespaces.
|
See also
reset | () | method |
public function reset():void
Non-standard (Microsoft)
Resets the iterator.
Note: Implemented in: MSXML 3.0 and later.
See also
DOM 1 Core setNamedItem | () | method |
public function setNamedItem(arg:Node):Node
Introduced in: | DOM 1 Core |
Adds (or replaces) a node by its nodeName.
Parameters
arg:Node — A node to store in this map. The node will later be
accessible using the value of its nodeName attribute.
|
Node — If the new Node replaces an existing node the replaced
Node is returned, otherwise null is returned.
|
DOMException — WRONG_DOCUMENT_ERR: Raised if arg was
created from a different document than the one that created this map.
| |
DOMException — NO_MODIFICATION_ALLOWED_ERR: Raised if
this map is readonly.
| |
DOMException — INUSE_ATTRIBUTE_ERR: Raised if arg is
an Attr that is already an attribute of another Element object. The
DOM user must explicitly clone Attr nodes to re-use them in
other elements.
| |
DOMException — HIERARCHY_REQUEST_ERR: Raised if an
attempt is made to add a node doesn't belong in this NamedNodeMap.
Examples would include trying to insert something other than an Attr
node into an Element's map of attributes, or a non-Entity node into
the DocumentType's map of Entities.
|
See also
DOM 2 Core setNamedItemNS | () | method |
public function setNamedItemNS(arg:Node):Node
Introduced in: | DOM 2 Core |
Adds (or replaces) a node by its localName and namespaceURI.
Parameters
arg:Node — A node to store in this map. The node will later be
accessible using the value of its namespaceURI and localName attributes.
|
Node — If the new Node replaces an existing node the replaced Node
is returned, otherwise null is returned.
|
DOMException — WRONG_DOCUMENT_ERR: Raised if arg was
created from a different document than the one that created this map.
| |
DOMException — NO_MODIFICATION_ALLOWED_ERR: Raised if
this map is readonly.
| |
DOMException — INUSE_ATTRIBUTE_ERR: Raised if arg is an
Attr that is already an attribute of another Element object. The DOM
user must explicitly clone Attr nodes to re-use them in other elements.
| |
DOMException — HIERARCHY_REQUEST_ERR: Raised if an
attempt is made to add a node doesn't belong in this NamedNodeMap.
Examples would include trying to insert something other than an Attr
node into an Element's map of attributes, or a non-Entity node into
the DocumentType's map of Entities.
| |
DOMException — NOT_SUPPORTED_ERR: May be raised if the
implementation does not support the feature "XML" and the language
exposed through the Document does not support XML Namespaces.
|
See also