<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=ISO-8859-1" >
< title > TQDomNamedNodeMap Class< / title >
< style type = "text/css" > < ! - -
fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
-->< / style >
< / head >
< body >
< table border = "0" cellpadding = "0" cellspacing = "0" width = "100%" >
< tr bgcolor = "#E5E5E5" >
< td valign = center >
< a href = "index.html" >
< font color = "#004faf" > Home< / font > < / a >
| < a href = "classes.html" >
< font color = "#004faf" > All Classes< / font > < / a >
| < a href = "mainclasses.html" >
< font color = "#004faf" > Main Classes< / font > < / a >
| < a href = "annotated.html" >
< font color = "#004faf" > Annotated< / font > < / a >
| < a href = "groups.html" >
< font color = "#004faf" > Grouped Classes< / font > < / a >
| < a href = "functions.html" >
< font color = "#004faf" > Functions< / font > < / a >
< / td >
< td align = "right" valign = "center" > < img src = "logo32.png" align = "right" width = "64" height = "32" border = "0" > < / td > < / tr > < / table > < h1 align = center > TQDomNamedNodeMap Class Reference< br > < small > [< a href = "xml.html" > XML module< / a > ]< / small > < / h1 >
< p > The TQDomNamedNodeMap class contains a collection of nodes
that can be accessed by name.
< a href = "#details" > More...< / a >
< p > All the functions in this class are < a href = "threads.html#reentrant" > reentrant< / a > when TQt is built with thread support.< / p >
< p > < tt > #include < < a href = "tqdom-h.html" > tqdom.h< / a > > < / tt >
< p > < a href = "tqdomnamednodemap-members.html" > List of all member functions.< / a >
< h2 > Public Members< / h2 >
< ul >
< li class = fn > < a href = "#TQDomNamedNodeMap" > < b > TQDomNamedNodeMap< / b > < / a > ()< / li >
< li class = fn > < a href = "#TQDomNamedNodeMap-2" > < b > TQDomNamedNodeMap< / b > < / a > ( const TQDomNamedNodeMap & n )< / li >
< li class = fn > TQDomNamedNodeMap & < a href = "#operator-eq" > < b > operator=< / b > < / a > ( const TQDomNamedNodeMap & n )< / li >
< li class = fn > bool < a href = "#operator-eq-eq" > < b > operator==< / b > < / a > ( const TQDomNamedNodeMap & n ) const< / li >
< li class = fn > bool < a href = "#operator!-eq" > < b > operator!=< / b > < / a > ( const TQDomNamedNodeMap & n ) const< / li >
< li class = fn > < a href = "#~TQDomNamedNodeMap" > < b > ~TQDomNamedNodeMap< / b > < / a > ()< / li >
< li class = fn > TQDomNode < a href = "#namedItem" > < b > namedItem< / b > < / a > ( const TQString & name ) const< / li >
< li class = fn > TQDomNode < a href = "#setNamedItem" > < b > setNamedItem< / b > < / a > ( const TQDomNode & newNode )< / li >
< li class = fn > TQDomNode < a href = "#removeNamedItem" > < b > removeNamedItem< / b > < / a > ( const TQString & name )< / li >
< li class = fn > TQDomNode < a href = "#item" > < b > item< / b > < / a > ( int index ) const< / li >
< li class = fn > TQDomNode < a href = "#namedItemNS" > < b > namedItemNS< / b > < / a > ( const TQString & nsURI, const TQString & localName ) const< / li >
< li class = fn > TQDomNode < a href = "#setNamedItemNS" > < b > setNamedItemNS< / b > < / a > ( const TQDomNode & newNode )< / li >
< li class = fn > TQDomNode < a href = "#removeNamedItemNS" > < b > removeNamedItemNS< / b > < / a > ( const TQString & nsURI, const TQString & localName )< / li >
< li class = fn > uint < a href = "#length" > < b > length< / b > < / a > () const< / li >
< li class = fn > uint < a href = "#count" > < b > count< / b > < / a > () const< / li >
< li class = fn > bool < a href = "#contains" > < b > contains< / b > < / a > ( const TQString & name ) const< / li >
< / ul >
< hr > < a name = "details" > < / a > < h2 > Detailed Description< / h2 >
The TQDomNamedNodeMap class contains a collection of nodes
that can be accessed by name.
< p >
< p > Note that TQDomNamedNodeMap does not inherit from < a href = "tqdomnodelist.html" > TQDomNodeList< / a > .
TQDomNamedNodeMaps do not provide any specific node ordering.
Although nodes in a TQDomNamedNodeMap may be accessed by an ordinal
index, this is simply to allow a convenient enumeration of the
contents of a TQDomNamedNodeMap, and does not imply that the DOM
specifies an ordering of the nodes.
< p > The TQDomNamedNodeMap is used in three places:
< ol type = 1 >
< li > < a href = "tqdomdocumenttype.html#entities" > TQDomDocumentType::entities< / a > () returns a map of all entities
described in the DTD.
< li > < a href = "tqdomdocumenttype.html#notations" > TQDomDocumentType::notations< / a > () returns a map of all notations
described in the DTD.
< li > < a href = "tqdomnode.html#attributes" > TQDomNode::attributes< / a > () returns a map of all attributes of an
element.
< / ol >
< p > Items in the map are identified by the name which TQDomNode::name()
returns. Nodes are retrieved using < a href = "#namedItem" > namedItem< / a > (), < a href = "#namedItemNS" > namedItemNS< / a > () or
< a href = "#item" > item< / a > (). New nodes are inserted with < a href = "#setNamedItem" > setNamedItem< / a > () or
< a href = "#setNamedItemNS" > setNamedItemNS< / a > () and removed with < a href = "#removeNamedItem" > removeNamedItem< / a > () or
< a href = "#removeNamedItemNS" > removeNamedItemNS< / a > (). Use < a href = "#contains" > contains< / a > () to see if an item with the
given name is in the named node map. The number of items is
returned by < a href = "#length" > length< / a > ().
< p > Terminology: in this class we use "item" and "node"
interchangeably.
< p > See also < a href = "xml-tools.html" > XML< / a > .
< hr > < h2 > Member Function Documentation< / h2 >
< h3 class = fn > < a name = "TQDomNamedNodeMap" > < / a > TQDomNamedNodeMap::TQDomNamedNodeMap ()
< / h3 >
Constructs an empty named node map.
< h3 class = fn > < a name = "TQDomNamedNodeMap-2" > < / a > TQDomNamedNodeMap::TQDomNamedNodeMap ( const < a href = "tqdomnamednodemap.html" > TQDomNamedNodeMap< / a > & n )
< / h3 >
Constructs a copy of < em > n< / em > .
< h3 class = fn > < a name = "~TQDomNamedNodeMap" > < / a > TQDomNamedNodeMap::~TQDomNamedNodeMap ()
< / h3 >
Destroys the object and frees its resources.
< h3 class = fn > bool < a name = "contains" > < / a > TQDomNamedNodeMap::contains ( const < a href = "tqstring.html" > TQString< / a > & name ) const
< / h3 >
Returns TRUE if the map contains a node called < em > name< / em > ; otherwise
returns FALSE.
< h3 class = fn > uint < a name = "count" > < / a > TQDomNamedNodeMap::count () const
< / h3 >
< p > Returns the number of nodes in the map.
< p > This function is the same as < a href = "#length" > length< / a > ().
< h3 class = fn > < a href = "tqdomnode.html" > TQDomNode< / a > < a name = "item" > < / a > TQDomNamedNodeMap::item ( int index ) const
< / h3 >
Retrieves the node at position < em > index< / em > .
< p > This can be used to iterate over the map. Note that the nodes in
the map are ordered arbitrarily.
< p > < p > See also < a href = "#length" > length< / a > ().
< h3 class = fn > uint < a name = "length" > < / a > TQDomNamedNodeMap::length () const
< / h3 >
Returns the number of nodes in the map.
< p > < p > See also < a href = "#item" > item< / a > ().
< h3 class = fn > < a href = "tqdomnode.html" > TQDomNode< / a > < a name = "namedItem" > < / a > TQDomNamedNodeMap::namedItem ( const < a href = "tqstring.html" > TQString< / a > & name ) const
< / h3 >
Returns the node called < em > name< / em > .
< p > If the named node map does not contain such a node, a < a href = "tqdomnode.html#isNull" > null node< / a > is returned. A node's name is
the name returned by < a href = "tqdomnode.html#nodeName" > TQDomNode::nodeName< / a > ().
< p > < p > See also < a href = "#setNamedItem" > setNamedItem< / a > () and < a href = "#namedItemNS" > namedItemNS< / a > ().
< h3 class = fn > < a href = "tqdomnode.html" > TQDomNode< / a > < a name = "namedItemNS" > < / a > TQDomNamedNodeMap::namedItemNS ( const < a href = "tqstring.html" > TQString< / a > & nsURI, const < a href = "tqstring.html" > TQString< / a > & localName ) const
< / h3 >
Returns the node associated with the local name < em > localName< / em > and
the namespace URI < em > nsURI< / em > .
< p > If the map does not contain such a node, a < a href = "tqdomnode.html#isNull" > null node< / a > is returned.
< p > < p > See also < a href = "#setNamedItemNS" > setNamedItemNS< / a > () and < a href = "#namedItem" > namedItem< / a > ().
< h3 class = fn > bool < a name = "operator!-eq" > < / a > TQDomNamedNodeMap::operator!= ( const < a href = "tqdomnamednodemap.html" > TQDomNamedNodeMap< / a > & n ) const
< / h3 >
Returns TRUE if < em > n< / em > and this named node map are not equal;
otherwise returns FALSE.
< h3 class = fn > < a href = "tqdomnamednodemap.html" > TQDomNamedNodeMap< / a > & < a name = "operator-eq" > < / a > TQDomNamedNodeMap::operator= ( const < a href = "tqdomnamednodemap.html" > TQDomNamedNodeMap< / a > & n )
< / h3 >
Assigns < em > n< / em > to this named node map.
< h3 class = fn > bool < a name = "operator-eq-eq" > < / a > TQDomNamedNodeMap::operator== ( const < a href = "tqdomnamednodemap.html" > TQDomNamedNodeMap< / a > & n ) const
< / h3 >
Returns TRUE if < em > n< / em > and this named node map are equal; otherwise
returns FALSE.
< h3 class = fn > < a href = "tqdomnode.html" > TQDomNode< / a > < a name = "removeNamedItem" > < / a > TQDomNamedNodeMap::removeNamedItem ( const < a href = "tqstring.html" > TQString< / a > & name )
< / h3 >
Removes the node called < em > name< / em > from the map.
< p > The function returns the removed node or a < a href = "tqdomnode.html#isNull" > null node< / a > if the map did not contain a
node called < em > name< / em > .
< p > < p > See also < a href = "#setNamedItem" > setNamedItem< / a > (), < a href = "#namedItem" > namedItem< / a > (), and < a href = "#removeNamedItemNS" > removeNamedItemNS< / a > ().
< h3 class = fn > < a href = "tqdomnode.html" > TQDomNode< / a > < a name = "removeNamedItemNS" > < / a > TQDomNamedNodeMap::removeNamedItemNS ( const < a href = "tqstring.html" > TQString< / a > & nsURI, const < a href = "tqstring.html" > TQString< / a > & localName )
< / h3 >
Removes the node with the local name < em > localName< / em > and the
namespace URI < em > nsURI< / em > from the map.
< p > The function returns the removed node or a < a href = "tqdomnode.html#isNull" > null node< / a > if the map did not contain a
node with the local name < em > localName< / em > and the namespace URI < em > nsURI< / em > .
< p > < p > See also < a href = "#setNamedItemNS" > setNamedItemNS< / a > (), < a href = "#namedItemNS" > namedItemNS< / a > (), and < a href = "#removeNamedItem" > removeNamedItem< / a > ().
< h3 class = fn > < a href = "tqdomnode.html" > TQDomNode< / a > < a name = "setNamedItem" > < / a > TQDomNamedNodeMap::setNamedItem ( const < a href = "tqdomnode.html" > TQDomNode< / a > & newNode )
< / h3 >
Inserts the node < em > newNode< / em > into the named node map. The name used
by the map is the node name of < em > newNode< / em > as returned by
< a href = "tqdomnode.html#nodeName" > TQDomNode::nodeName< / a > ().
< p > If the new node replaces an existing node, i.e. the map contains a
node with the same name, the replaced node is returned.
< p > < p > See also < a href = "#namedItem" > namedItem< / a > (), < a href = "#removeNamedItem" > removeNamedItem< / a > (), and < a href = "#setNamedItemNS" > setNamedItemNS< / a > ().
< h3 class = fn > < a href = "tqdomnode.html" > TQDomNode< / a > < a name = "setNamedItemNS" > < / a > TQDomNamedNodeMap::setNamedItemNS ( const < a href = "tqdomnode.html" > TQDomNode< / a > & newNode )
< / h3 >
Inserts the node < em > newNode< / em > 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 < em > newNode< / em > . If the new node replaces an existing
node, the replaced node is returned.
< p > < p > See also < a href = "#namedItemNS" > namedItemNS< / a > (), < a href = "#removeNamedItemNS" > removeNamedItemNS< / a > (), and < a href = "#setNamedItem" > setNamedItem< / a > ().
<!-- eof -->
< hr > < p >
This file is part of the < a href = "index.html" > TQt toolkit< / a > .
Copyright © 1995-2007
< a href = "http://www.trolltech.com/" > Trolltech< / a > . All Rights Reserved.< p > < address > < hr > < div align = center >
< table width = 100% cellspacing = 0 border = 0 > < tr >
< td > Copyright © 2007
< a href = "troll.html" > Trolltech< / a > < td align = center > < a href = "trademarks.html" > Trademarks< / a >
< td align = right > < div align = right > TQt 3.3.8< / div >
< / table > < / div > < / address > < / body >
< / html >