You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
201 lines
11 KiB
201 lines
11 KiB
14 years ago
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||
|
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/xml/qdom.cpp:2639 -->
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||
|
<title>QDomNamedNodeMap 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>QDomNamedNodeMap Class Reference<br><small>[<a href="xml.html">XML module</a>]</small></h1>
|
||
|
|
||
|
<p>The QDomNamedNodeMap 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 Qt is built with thread support.</p>
|
||
|
<p><tt>#include <<a href="qdom-h.html">qdom.h</a>></tt>
|
||
|
<p><a href="qdomnamednodemap-members.html">List of all member functions.</a>
|
||
|
<h2>Public Members</h2>
|
||
|
<ul>
|
||
|
<li class=fn><a href="#QDomNamedNodeMap"><b>QDomNamedNodeMap</b></a> ()</li>
|
||
|
<li class=fn><a href="#QDomNamedNodeMap-2"><b>QDomNamedNodeMap</b></a> ( const QDomNamedNodeMap & n )</li>
|
||
|
<li class=fn>QDomNamedNodeMap & <a href="#operator-eq"><b>operator=</b></a> ( const QDomNamedNodeMap & n )</li>
|
||
|
<li class=fn>bool <a href="#operator-eq-eq"><b>operator==</b></a> ( const QDomNamedNodeMap & n ) const</li>
|
||
|
<li class=fn>bool <a href="#operator!-eq"><b>operator!=</b></a> ( const QDomNamedNodeMap & n ) const</li>
|
||
|
<li class=fn><a href="#~QDomNamedNodeMap"><b>~QDomNamedNodeMap</b></a> ()</li>
|
||
|
<li class=fn>QDomNode <a href="#namedItem"><b>namedItem</b></a> ( const QString & name ) const</li>
|
||
|
<li class=fn>QDomNode <a href="#setNamedItem"><b>setNamedItem</b></a> ( const QDomNode & newNode )</li>
|
||
|
<li class=fn>QDomNode <a href="#removeNamedItem"><b>removeNamedItem</b></a> ( const QString & name )</li>
|
||
|
<li class=fn>QDomNode <a href="#item"><b>item</b></a> ( int index ) const</li>
|
||
|
<li class=fn>QDomNode <a href="#namedItemNS"><b>namedItemNS</b></a> ( const QString & nsURI, const QString & localName ) const</li>
|
||
|
<li class=fn>QDomNode <a href="#setNamedItemNS"><b>setNamedItemNS</b></a> ( const QDomNode & newNode )</li>
|
||
|
<li class=fn>QDomNode <a href="#removeNamedItemNS"><b>removeNamedItemNS</b></a> ( const QString & nsURI, const QString & 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 QString & name ) const</li>
|
||
|
</ul>
|
||
|
<hr><a name="details"></a><h2>Detailed Description</h2>
|
||
|
|
||
|
|
||
|
|
||
|
The QDomNamedNodeMap class contains a collection of nodes
|
||
|
that can be accessed by name.
|
||
|
|
||
|
<p>
|
||
|
|
||
|
<p> Note that QDomNamedNodeMap does not inherit from <a href="qdomnodelist.html">QDomNodeList</a>.
|
||
|
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.
|
||
|
<p> The QDomNamedNodeMap is used in three places:
|
||
|
<ol type=1>
|
||
|
<li> <a href="qdomdocumenttype.html#entities">QDomDocumentType::entities</a>() returns a map of all entities
|
||
|
described in the DTD.
|
||
|
<li> <a href="qdomdocumenttype.html#notations">QDomDocumentType::notations</a>() returns a map of all notations
|
||
|
described in the DTD.
|
||
|
<li> <a href="qdomnode.html#attributes">QDomNode::attributes</a>() returns a map of all attributes of an
|
||
|
element.
|
||
|
</ol>
|
||
|
<p> Items in the map are identified by the name which QDomNode::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="QDomNamedNodeMap"></a>QDomNamedNodeMap::QDomNamedNodeMap ()
|
||
|
</h3>
|
||
|
Constructs an empty named node map.
|
||
|
|
||
|
<h3 class=fn><a name="QDomNamedNodeMap-2"></a>QDomNamedNodeMap::QDomNamedNodeMap ( const <a href="qdomnamednodemap.html">QDomNamedNodeMap</a> & n )
|
||
|
</h3>
|
||
|
Constructs a copy of <em>n</em>.
|
||
|
|
||
|
<h3 class=fn><a name="~QDomNamedNodeMap"></a>QDomNamedNodeMap::~QDomNamedNodeMap ()
|
||
|
</h3>
|
||
|
Destroys the object and frees its resources.
|
||
|
|
||
|
<h3 class=fn>bool <a name="contains"></a>QDomNamedNodeMap::contains ( const <a href="qstring.html">QString</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>QDomNamedNodeMap::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="qdomnode.html">QDomNode</a> <a name="item"></a>QDomNamedNodeMap::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>QDomNamedNodeMap::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="qdomnode.html">QDomNode</a> <a name="namedItem"></a>QDomNamedNodeMap::namedItem ( const <a href="qstring.html">QString</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="qdomnode.html#isNull">null node</a> is returned. A node's name is
|
||
|
the name returned by <a href="qdomnode.html#nodeName">QDomNode::nodeName</a>().
|
||
|
<p> <p>See also <a href="#setNamedItem">setNamedItem</a>() and <a href="#namedItemNS">namedItemNS</a>().
|
||
|
|
||
|
<h3 class=fn><a href="qdomnode.html">QDomNode</a> <a name="namedItemNS"></a>QDomNamedNodeMap::namedItemNS ( const <a href="qstring.html">QString</a> & nsURI, const <a href="qstring.html">QString</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="qdomnode.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>QDomNamedNodeMap::operator!= ( const <a href="qdomnamednodemap.html">QDomNamedNodeMap</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="qdomnamednodemap.html">QDomNamedNodeMap</a> & <a name="operator-eq"></a>QDomNamedNodeMap::operator= ( const <a href="qdomnamednodemap.html">QDomNamedNodeMap</a> & n )
|
||
|
</h3>
|
||
|
Assigns <em>n</em> to this named node map.
|
||
|
|
||
|
<h3 class=fn>bool <a name="operator-eq-eq"></a>QDomNamedNodeMap::operator== ( const <a href="qdomnamednodemap.html">QDomNamedNodeMap</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="qdomnode.html">QDomNode</a> <a name="removeNamedItem"></a>QDomNamedNodeMap::removeNamedItem ( const <a href="qstring.html">QString</a> & name )
|
||
|
</h3>
|
||
|
Removes the node called <em>name</em> from the map.
|
||
|
<p> The function returns the removed node or a <a href="qdomnode.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="qdomnode.html">QDomNode</a> <a name="removeNamedItemNS"></a>QDomNamedNodeMap::removeNamedItemNS ( const <a href="qstring.html">QString</a> & nsURI, const <a href="qstring.html">QString</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="qdomnode.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="qdomnode.html">QDomNode</a> <a name="setNamedItem"></a>QDomNamedNodeMap::setNamedItem ( const <a href="qdomnode.html">QDomNode</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="qdomnode.html#nodeName">QDomNode::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="qdomnode.html">QDomNode</a> <a name="setNamedItemNS"></a>QDomNamedNodeMap::setNamedItemNS ( const <a href="qdomnode.html">QDomNode</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">Qt 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>Qt 3.3.8</div>
|
||
|
</table></div></address></body>
|
||
|
</html>
|