.TH "DOM::NamedNodeMap" kde3 "11 Jun 2005" "Version Version 3.4.1" "khtml Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
DOM::NamedNodeMap \- Objects implementing the \fC\fBNamedNodeMap\fP\fP interface are used to represent collections of nodes that can be accessed by name.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <dom_node.h>\fP
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBNamedNodeMap\fP (const \fBNamedNodeMap\fP &other)"
.br
.ti -1c
.RI "\fBNamedNodeMap\fP & \fBoperator=\fP (const \fBNamedNodeMap\fP &other)"
.br
.ti -1c
.RI "unsigned long \fBlength\fP () const "
.br
.ti -1c
.RI "\fBNode\fP \fBgetNamedItem\fP (const \fBDOMString\fP &name) const "
.br
.ti -1c
.RI "\fBNode\fP \fBsetNamedItem\fP (const \fBNode\fP &arg)"
.br
.ti -1c
.RI "\fBNode\fP \fBremoveNamedItem\fP (const \fBDOMString\fP &name)"
.br
.ti -1c
.RI "\fBNode\fP \fBitem\fP (unsigned long index) const "
.br
.ti -1c
.RI "\fBNode\fP \fBgetNamedItemNS\fP (const \fBDOMString\fP &namespaceURI, const \fBDOMString\fP &localName) const "
.br
.ti -1c
.RI "\fBNode\fP \fBsetNamedItemNS\fP (const \fBNode\fP &arg)"
.br
.ti -1c
.RI "\fBNode\fP \fBremoveNamedItemNS\fP (const \fBDOMString\fP &namespaceURI, const \fBDOMString\fP &localName)"
.br
.ti -1c
.RI "NamedNodeMapImpl * \fBhandle\fP () const "
.br
.ti -1c
.RI "bool \fBisNull\fP () const "
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "\fBNamedNodeMap\fP (NamedNodeMapImpl *i)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "NamedNodeMapImpl * \fBimpl\fP"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBNode\fP"
.br
.ti -1c
.RI "class \fBDocumentType\fP"
.br
.ti -1c
.RI "class \fBNodeImpl\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
Objects implementing the \fC\fBNamedNodeMap\fP\fP interface are used to represent collections of nodes that can be accessed by name. 

Note that \fC\fBNamedNodeMap\fP\fP does not inherit from \fC\fBNodeList\fP\fP ; \fC\fBNamedNodeMap\fP\fP s are not maintained in any particular order. Objects contained in an object implementing \fC\fBNamedNodeMap\fP\fP may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of a \fC\fBNamedNodeMap\fP\fP , and does not imply that the \fBDOM\fP specifies an order to these Nodes. 
.PP
Definition at line 62 of file dom_node.h.
.SH "Member Function Documentation"
.PP 
.SS "unsigned long NamedNodeMap::length () const"
.PP
The number of nodes in the map. 
.PP
The range of valid child node indices is 0 to \fClength-1\fP inclusive. 
.PP
Definition at line 131 of file dom_node.cpp.
.PP
Referenced by DOM::Node::hasAttributes().
.SS "\fBNode\fP NamedNodeMap::getNamedItem (const \fBDOMString\fP & name) const"
.PP
Retrieves a node specified by name. 
.PP
\fBParameters:\fP
.RS 4
\fIname\fP Name of a node to retrieve.
.RE
.PP
\fBReturns:\fP
.RS 4
A \fC\fBNode\fP\fP (of any type) with the specified name, or \fCnull\fP if the specified name did not identify any node in the map. 
.RE
.PP

.PP
Definition at line 66 of file dom_node.cpp.
.SS "\fBNode\fP NamedNodeMap::setNamedItem (const \fBNode\fP & arg)"
.PP
Adds a node using its \fCnodeName\fP attribute. 
.PP
As the \fCnodeName\fP attribute is used to derive the name which the node must be stored under, multiple nodes of certain types (those that have a 'special' string value) cannot be stored as the names would clash. This is seen as preferable to allowing nodes to be aliased.
.PP
\fBParameters:\fP
.RS 4
\fIarg\fP A node to store in a named node map. The node will later be accessible using the value of the \fCnodeName\fP attribute of the node. If a node with that name is already present in the map, it is replaced by the new one.
.RE
.PP
\fBReturns:\fP
.RS 4
If the new \fC\fBNode\fP\fP replaces an existing node with the same name the previously existing \fC\fBNode\fP\fP is returned, otherwise \fCnull\fP is returned.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIDOMException\fP WRONG_DOCUMENT_ERR: Raised if \fCarg\fP was created from a different document than the one that created the \fC\fBNamedNodeMap\fP\fP .
.RE
.PP
NO_MODIFICATION_ALLOWED_ERR: Raised if this \fC\fBNamedNodeMap\fP\fP is readonly.
.PP
INUSE_ATTRIBUTE_ERR: Raised if \fCarg\fP is an \fC\fBAttr\fP\fP that is already an attribute of another \fC\fBElement\fP\fP object. The \fBDOM\fP user must explicitly clone \fC\fBAttr\fP\fP nodes to re-use them in other elements. 
.PP
Definition at line 74 of file dom_node.cpp.
.PP
Referenced by DOM::Element::setAttributeNode(), and DOM::Element::setAttributeNodeNS().
.SS "\fBNode\fP NamedNodeMap::removeNamedItem (const \fBDOMString\fP & name)"
.PP
Removes a node specified by name. 
.PP
If the removed node is an \fC\fBAttr\fP\fP with a default value it is immediately replaced.
.PP
\fBParameters:\fP
.RS 4
\fIname\fP The name of a node to remove.
.RE
.PP
\fBReturns:\fP
.RS 4
The node removed from the map or \fCnull\fP if no node with such a name exists.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIDOMException\fP NOT_FOUND_ERR: Raised if there is no node named \fCname\fP in the map. 
.RE
.PP

.PP
Definition at line 86 of file dom_node.cpp.
.PP
Referenced by DOM::Element::removeAttribute(), and DOM::Element::removeAttributeNS().
.SS "\fBNode\fP NamedNodeMap::item (unsigned long index) const"
.PP
Returns the \fCindex\fP th item in the map. 
.PP
If \fCindex\fP is greater than or equal to the number of nodes in the map, this returns \fCnull\fP .
.PP
\fBParameters:\fP
.RS 4
\fIindex\fP Index into the map.
.RE
.PP
\fBReturns:\fP
.RS 4
The node at the \fCindex\fP th position in the \fC\fBNamedNodeMap\fP\fP , or \fCnull\fP if that is not a valid index. 
.RE
.PP

.PP
Definition at line 97 of file dom_node.cpp.
.SS "\fBNode\fP NamedNodeMap::getNamedItemNS (const \fBDOMString\fP & namespaceURI, const \fBDOMString\fP & localName) const"
.PP
Introduced in \fBDOM\fP Level 2. 
.PP
Retrieves a node specified by local name and namespace URI. HTML-only \fBDOM\fP implementations do not need to implement this method.
.PP
\fBParameters:\fP
.RS 4
\fInamespaceURI\fP The namespace URI of the node to retrieve.
.br
\fIlocalName\fP The local name of the node to retrieve.
.RE
.PP
\fBReturns:\fP
.RS 4
A \fBNode\fP (of any type) with the specified local name and namespace URI, or null if they do not identify any node in this map. 
.RE
.PP

.PP
Definition at line 103 of file dom_node.cpp.
.SS "\fBNode\fP NamedNodeMap::setNamedItemNS (const \fBNode\fP & arg)"
.PP
Introduced in \fBDOM\fP Level 2. 
.PP
Adds a node using its namespaceURI and localName. If a node with that namespace URI and that local name is already present in this map, it is replaced by the new one. HTML-only \fBDOM\fP implementations do not need to implement this method.
.PP
\fBParameters:\fP
.RS 4
\fIarg\fP A node to store in this map. The node will later be accessible using the value of its namespaceURI and localName attributes.
.RE
.PP
\fBReturns:\fP
.RS 4
If the new \fBNode\fP replaces an existing node the replaced \fBNode\fP is returned, otherwise null is returned.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIDOMException\fP WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created this map.
.RE
.PP
NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
.PP
INUSE_ATTRIBUTE_ERR: Raised if arg is an \fBAttr\fP that is already an attribute of another \fBElement\fP object. The \fBDOM\fP user must explicitly clone \fBAttr\fP nodes to re-use them in other elements. 
.PP
Definition at line 110 of file dom_node.cpp.
.SS "\fBNode\fP NamedNodeMap::removeNamedItemNS (const \fBDOMString\fP & namespaceURI, const \fBDOMString\fP & localName)"
.PP
Introduced in \fBDOM\fP Level 2. 
.PP
Removes a node specified by local name and namespace URI. A removed attribute may be known to have a default value when this map contains the attributes attached to an element, as returned by the attributes attribute of the \fBNode\fP interface. If so, an attribute immediately appears containing the default value as well as the corresponding namespace URI, local name, and prefix when applicable. HTML-only \fBDOM\fP implementations do not need to implement this method.
.PP
\fBParameters:\fP
.RS 4
\fInamespaceURI\fP The namespace URI of the node to remove.
.br
\fIlocalName\fP The local name of the node to remove.
.RE
.PP
\fBReturns:\fP
.RS 4
The node removed from this map if a node with such a local name and namespace URI exists.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIDOMException\fP NOT_FOUND_ERR: Raised if there is no node with the specified namespaceURI and localName in this map.
.RE
.PP
NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. 
.PP
Definition at line 120 of file dom_node.cpp.

.SH "Author"
.PP 
Generated automatically by Doxygen for khtml Library from the source code.
