QDomNamedNodeMap(3qt)

NAME
QDomNamedNodeMap - Collection of nodes that can be accessed by name

#include <qdom.h>

  Public Members
QDomNamedNodeMap ()
QDomNamedNodeMap ( const QDomNamedNodeMap & )
QDomNamedNodeMap& operator= ( const QDomNamedNodeMap & )
bool operator== ( const QDomNamedNodeMap & ) const
bool operator!= ( const QDomNamedNodeMap & ) const
~QDomNamedNodeMap ()
QDomNode namedItem ( const QString & name ) const
QDomNode setNamedItem ( const QDomNode & arg )
QDomNode removeNamedItem ( const QString & name )
QDomNode item ( int index ) const
uint length () const
bool contains ( const QString & name ) const

DESCRIPTION
The QDomNamedNodeMap class contains a collection of nodes that can be accessed by name.

Note that QDomNamedNodeMap does not inherit from QDomNodeList; QDomNamedNodeMaps does not provide any specific order of the nodes. Nodes contained in a QDomNamedNodeMap may also be accessed by an ordinal index, but this is simply to allow a convenient enumeration of the contents of a QDomNamedNodeMap and does not imply that the DOM specifies an order on the nodes.

The QDomNamedNodeMap is used in three places:

QDomDocumentType::entities() returns a map of all entities described in the DTD.

QDomDocumentType::notations() returns a map of all notations described in the DTD.

QDomElement::attributes() returns a map of all attributes of the element.

Items in the map are identified by the name which QDomNode::name() returns. They can be queried using the namedItem() function and set using setNamedItem().

See also namedItem() and setNamedItem().

MEMBER FUNCTION DOCUMENTATION

QDomNamedNodeMap::QDomNamedNodeMap ()
Constructs an empty map.

QDomNamedNodeMap::QDomNamedNodeMap ( const QDomNamedNodeMap & n )
Copy constructor.

QDomNamedNodeMap::~QDomNamedNodeMap ()
Destructor.

bool QDomNamedNodeMap::contains ( const QString & name ) const
Returns TRUE if the map contains a node with the name name, otherwise FALSE.

QDomNode QDomNamedNodeMap::item ( int index ) const
Retrieves the node at position index.

This can be used to iterate over the map.

See also length().

uint QDomNamedNodeMap::length () const
Returns the number of nodes in the map.

See also item().

QDomNode QDomNamedNodeMap::namedItem ( const QString & name ) const
Returns the node associated with they key name.

If the map does not contain such a node, then a null node is returned.

See also setNamedItem().

bool QDomNamedNodeMap::operator!= ( const QDomNamedNodeMap & n ) const
Returns TRUE if the maps are not equal, FALSE otherwise.

QDomNamedNodeMap& QDomNamedNodeMap::operator= ( const QDomNamedNodeMap & n )
Assignement operator.

bool QDomNamedNodeMap::operator== ( const QDomNamedNodeMap & n ) const
Returns TRUE if the maps are equal, FALSE otherwise.

QDomNode QDomNamedNodeMap::removeNamedItem ( const QString & name )
Removes the node with the name name from the map.

The function returns the removed node or a null node if the map did not contain a node with the name name.

See also setNamedItem().

QDomNode QDomNamedNodeMap::setNamedItem ( const QDomNode & newNode )
Inserts the node newNode in the map. The kye for the map is the name of newNode as returned by QDomNode::nodeName().

The function returns the newly inserted node.

See also removeNamedItem().

SEE ALSO
http://doc.trolltech.com/qdomnamednodemap.html http://www.trolltech.com/faq/tech.html

COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.

BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports make our job much simpler. Thank you.

In case of content or formattting problems with this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qdomnamednodemap.3) and the Qt version (2.3.2).