.BI "bool \fBcontains\fR ( const QString & name ) const"
.br
.in -1c
.SH DESCRIPTION
The QDomNamedNodeMap class contains a collection of nodes that can be accessed by name.
.PP
Note that QDomNamedNodeMap does not inherit from QDomNodeList. QDomNamedNodeMaps do not provide any specific node ordering. Although nodes in a QDomNamedNodeMap may be accessed by an ordinal index, this is simply to allow a convenient enumeration of the contents of a QDomNamedNodeMap, and does not imply that the DOM specifies an ordering of the nodes.
.PP
The QDomNamedNodeMap is used in three places: <ol type=1>
.IP 1
QDomDocumentType::entities() returns a map of all entities described in the DTD.
.IP 2
QDomDocumentType::notations() returns a map of all notations described in the DTD.
.IP 3
QDomNode::attributes() returns a map of all attributes of an element.
.PP
Items in the map are identified by the name which QDomNode::name() returns. Nodes are retrieved using namedItem(), namedItemNS() or item(). New nodes are inserted with setNamedItem() or setNamedItemNS() and removed with removeNamedItem() or removeNamedItemNS(). Use contains() to see if an item with the given name is in the named node map. The number of items is returned by length().
.PP
Terminology: in this class we use "item" and "node" interchangeably.
.PP
See also XML.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QDomNamedNodeMap::QDomNamedNodeMap ()"
Constructs an empty named node map.
.SH "QDomNamedNodeMap::QDomNamedNodeMap ( const QDomNamedNodeMap & n )"
Constructs a copy of \fIn\fR.
.SH "QDomNamedNodeMap::~QDomNamedNodeMap ()"
Destroys the object and frees its resources.
.SH "bool QDomNamedNodeMap::contains ( const QString & name ) const"
Returns TRUE if the map contains a node called \fIname\fR; otherwise returns FALSE.
.SH "uint QDomNamedNodeMap::count () const"
Returns the number of nodes in the map.
.PP
This function is the same as length().
.SH "QDomNode QDomNamedNodeMap::item ( int index ) const"
Retrieves the node at position \fIindex\fR.
.PP
This can be used to iterate over the map. Note that the nodes in the map are ordered arbitrarily.
.PP
See also length().
.SH "uint QDomNamedNodeMap::length () const"
Returns the number of nodes in the map.
.PP
See also item().
.SH "QDomNode QDomNamedNodeMap::namedItem ( const QString & name ) const"
Returns the node called \fIname\fR.
.PP
If the named node map does not contain such a node, a null node is returned. A node's name is the name returned by QDomNode::nodeName().
Removes the node with the local name \fIlocalName\fR and the namespace URI \fInsURI\fR from the map.
.PP
The function returns the removed node or a null node if the map did not contain a node with the local name \fIlocalName\fR and the namespace URI \fInsURI\fR.
.PP
See also setNamedItemNS(), namedItemNS(), and removeNamedItem().
Inserts the node \fInewNode\fR into the named node map. The name used by the map is the node name of \fInewNode\fR as returned by QDomNode::nodeName().
.PP
If the new node replaces an existing node, i.e. the map contains a node with the same name, the replaced node is returned.
.PP
See also namedItem(), removeNamedItem(), and setNamedItemNS().
Inserts the node \fInewNode\fR in the map. If a node with the same namespace URI and the same local name already exists in the map, it is replaced by \fInewNode\fR. If the new node replaces an existing node, the replaced node is returned.
.PP
See also namedItemNS(), removeNamedItemNS(), and setNamedItem().