source: trunk/doc/html/qdomnamednodemap.html@ 208

Last change on this file since 208 was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 11.6 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/xml/qdom.cpp:2639 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QDomNamedNodeMap Class</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { background: #ffffff; color: black; }
12--></style>
13</head>
14<body>
15
16<table border="0" cellpadding="0" cellspacing="0" width="100%">
17<tr bgcolor="#E5E5E5">
18<td valign=center>
19 <a href="index.html">
20<font color="#004faf">Home</font></a>
21 | <a href="classes.html">
22<font color="#004faf">All&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;Classes</font></a>
25 | <a href="annotated.html">
26<font color="#004faf">Annotated</font></a>
27 | <a href="groups.html">
28<font color="#004faf">Grouped&nbsp;Classes</font></a>
29 | <a href="functions.html">
30<font color="#004faf">Functions</font></a>
31</td>
32<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>
33
34<p>The QDomNamedNodeMap class contains a collection of nodes
35that can be accessed by name.
36<a href="#details">More...</a>
37<p>All the functions in this class are <a href="threads.html#reentrant">reentrant</a> when Qt is built with thread support.</p>
38<p><tt>#include &lt;<a href="qdom-h.html">qdom.h</a>&gt;</tt>
39<p><a href="qdomnamednodemap-members.html">List of all member functions.</a>
40<h2>Public Members</h2>
41<ul>
42<li class=fn><a href="#QDomNamedNodeMap"><b>QDomNamedNodeMap</b></a> ()</li>
43<li class=fn><a href="#QDomNamedNodeMap-2"><b>QDomNamedNodeMap</b></a> ( const&nbsp;QDomNamedNodeMap&nbsp;&amp;&nbsp;n )</li>
44<li class=fn>QDomNamedNodeMap &amp; <a href="#operator-eq"><b>operator=</b></a> ( const&nbsp;QDomNamedNodeMap&nbsp;&amp;&nbsp;n )</li>
45<li class=fn>bool <a href="#operator-eq-eq"><b>operator==</b></a> ( const&nbsp;QDomNamedNodeMap&nbsp;&amp;&nbsp;n ) const</li>
46<li class=fn>bool <a href="#operator!-eq"><b>operator!=</b></a> ( const&nbsp;QDomNamedNodeMap&nbsp;&amp;&nbsp;n ) const</li>
47<li class=fn><a href="#~QDomNamedNodeMap"><b>~QDomNamedNodeMap</b></a> ()</li>
48<li class=fn>QDomNode <a href="#namedItem"><b>namedItem</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;name ) const</li>
49<li class=fn>QDomNode <a href="#setNamedItem"><b>setNamedItem</b></a> ( const&nbsp;QDomNode&nbsp;&amp;&nbsp;newNode )</li>
50<li class=fn>QDomNode <a href="#removeNamedItem"><b>removeNamedItem</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;name )</li>
51<li class=fn>QDomNode <a href="#item"><b>item</b></a> ( int&nbsp;index ) const</li>
52<li class=fn>QDomNode <a href="#namedItemNS"><b>namedItemNS</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;nsURI, const&nbsp;QString&nbsp;&amp;&nbsp;localName ) const</li>
53<li class=fn>QDomNode <a href="#setNamedItemNS"><b>setNamedItemNS</b></a> ( const&nbsp;QDomNode&nbsp;&amp;&nbsp;newNode )</li>
54<li class=fn>QDomNode <a href="#removeNamedItemNS"><b>removeNamedItemNS</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;nsURI, const&nbsp;QString&nbsp;&amp;&nbsp;localName )</li>
55<li class=fn>uint <a href="#length"><b>length</b></a> () const</li>
56<li class=fn>uint <a href="#count"><b>count</b></a> () const</li>
57<li class=fn>bool <a href="#contains"><b>contains</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;name ) const</li>
58</ul>
59<hr><a name="details"></a><h2>Detailed Description</h2>
60
61
62
63The QDomNamedNodeMap class contains a collection of nodes
64that can be accessed by name.
65
66<p>
67
68<p> Note that QDomNamedNodeMap does not inherit from <a href="qdomnodelist.html">QDomNodeList</a>.
69QDomNamedNodeMaps do not provide any specific node ordering.
70Although nodes in a QDomNamedNodeMap may be accessed by an ordinal
71index, this is simply to allow a convenient enumeration of the
72contents of a QDomNamedNodeMap, and does not imply that the DOM
73specifies an ordering of the nodes.
74<p> The QDomNamedNodeMap is used in three places:
75<ol type=1>
76<li> <a href="qdomdocumenttype.html#entities">QDomDocumentType::entities</a>() returns a map of all entities
77described in the DTD.
78<li> <a href="qdomdocumenttype.html#notations">QDomDocumentType::notations</a>() returns a map of all notations
79described in the DTD.
80<li> <a href="qdomnode.html#attributes">QDomNode::attributes</a>() returns a map of all attributes of an
81element.
82</ol>
83<p> Items in the map are identified by the name which QDomNode::name()
84returns. Nodes are retrieved using <a href="#namedItem">namedItem</a>(), <a href="#namedItemNS">namedItemNS</a>() or
85<a href="#item">item</a>(). New nodes are inserted with <a href="#setNamedItem">setNamedItem</a>() or
86<a href="#setNamedItemNS">setNamedItemNS</a>() and removed with <a href="#removeNamedItem">removeNamedItem</a>() or
87<a href="#removeNamedItemNS">removeNamedItemNS</a>(). Use <a href="#contains">contains</a>() to see if an item with the
88given name is in the named node map. The number of items is
89returned by <a href="#length">length</a>().
90<p> Terminology: in this class we use "item" and "node"
91interchangeably.
92<p>See also <a href="xml-tools.html">XML</a>.
93
94<hr><h2>Member Function Documentation</h2>
95<h3 class=fn><a name="QDomNamedNodeMap"></a>QDomNamedNodeMap::QDomNamedNodeMap ()
96</h3>
97Constructs an empty named node map.
98
99<h3 class=fn><a name="QDomNamedNodeMap-2"></a>QDomNamedNodeMap::QDomNamedNodeMap ( const&nbsp;<a href="qdomnamednodemap.html">QDomNamedNodeMap</a>&nbsp;&amp;&nbsp;n )
100</h3>
101Constructs a copy of <em>n</em>.
102
103<h3 class=fn><a name="~QDomNamedNodeMap"></a>QDomNamedNodeMap::~QDomNamedNodeMap ()
104</h3>
105Destroys the object and frees its resources.
106
107<h3 class=fn>bool <a name="contains"></a>QDomNamedNodeMap::contains ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;name ) const
108</h3>
109Returns TRUE if the map contains a node called <em>name</em>; otherwise
110returns FALSE.
111
112<h3 class=fn>uint <a name="count"></a>QDomNamedNodeMap::count () const
113</h3>
114
115<p> Returns the number of nodes in the map.
116<p> This function is the same as <a href="#length">length</a>().
117
118<h3 class=fn><a href="qdomnode.html">QDomNode</a> <a name="item"></a>QDomNamedNodeMap::item ( int&nbsp;index ) const
119</h3>
120Retrieves the node at position <em>index</em>.
121<p> This can be used to iterate over the map. Note that the nodes in
122the map are ordered arbitrarily.
123<p> <p>See also <a href="#length">length</a>().
124
125<h3 class=fn>uint <a name="length"></a>QDomNamedNodeMap::length () const
126</h3>
127Returns the number of nodes in the map.
128<p> <p>See also <a href="#item">item</a>().
129
130<h3 class=fn><a href="qdomnode.html">QDomNode</a> <a name="namedItem"></a>QDomNamedNodeMap::namedItem ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;name ) const
131</h3>
132Returns the node called <em>name</em>.
133<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
134the name returned by <a href="qdomnode.html#nodeName">QDomNode::nodeName</a>().
135<p> <p>See also <a href="#setNamedItem">setNamedItem</a>() and <a href="#namedItemNS">namedItemNS</a>().
136
137<h3 class=fn><a href="qdomnode.html">QDomNode</a> <a name="namedItemNS"></a>QDomNamedNodeMap::namedItemNS ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;nsURI, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;localName ) const
138</h3>
139Returns the node associated with the local name <em>localName</em> and
140the namespace URI <em>nsURI</em>.
141<p> If the map does not contain such a node, a <a href="qdomnode.html#isNull">null node</a> is returned.
142<p> <p>See also <a href="#setNamedItemNS">setNamedItemNS</a>() and <a href="#namedItem">namedItem</a>().
143
144<h3 class=fn>bool <a name="operator!-eq"></a>QDomNamedNodeMap::operator!= ( const&nbsp;<a href="qdomnamednodemap.html">QDomNamedNodeMap</a>&nbsp;&amp;&nbsp;n ) const
145</h3>
146Returns TRUE if <em>n</em> and this named node map are not equal;
147otherwise returns FALSE.
148
149<h3 class=fn><a href="qdomnamednodemap.html">QDomNamedNodeMap</a>&nbsp;&amp; <a name="operator-eq"></a>QDomNamedNodeMap::operator= ( const&nbsp;<a href="qdomnamednodemap.html">QDomNamedNodeMap</a>&nbsp;&amp;&nbsp;n )
150</h3>
151Assigns <em>n</em> to this named node map.
152
153<h3 class=fn>bool <a name="operator-eq-eq"></a>QDomNamedNodeMap::operator== ( const&nbsp;<a href="qdomnamednodemap.html">QDomNamedNodeMap</a>&nbsp;&amp;&nbsp;n ) const
154</h3>
155Returns TRUE if <em>n</em> and this named node map are equal; otherwise
156returns FALSE.
157
158<h3 class=fn><a href="qdomnode.html">QDomNode</a> <a name="removeNamedItem"></a>QDomNamedNodeMap::removeNamedItem ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;name )
159</h3>
160Removes the node called <em>name</em> from the map.
161<p> The function returns the removed node or a <a href="qdomnode.html#isNull">null node</a> if the map did not contain a
162node called <em>name</em>.
163<p> <p>See also <a href="#setNamedItem">setNamedItem</a>(), <a href="#namedItem">namedItem</a>(), and <a href="#removeNamedItemNS">removeNamedItemNS</a>().
164
165<h3 class=fn><a href="qdomnode.html">QDomNode</a> <a name="removeNamedItemNS"></a>QDomNamedNodeMap::removeNamedItemNS ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;nsURI, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;localName )
166</h3>
167Removes the node with the local name <em>localName</em> and the
168namespace URI <em>nsURI</em> from the map.
169<p> The function returns the removed node or a <a href="qdomnode.html#isNull">null node</a> if the map did not contain a
170node with the local name <em>localName</em> and the namespace URI <em>nsURI</em>.
171<p> <p>See also <a href="#setNamedItemNS">setNamedItemNS</a>(), <a href="#namedItemNS">namedItemNS</a>(), and <a href="#removeNamedItem">removeNamedItem</a>().
172
173<h3 class=fn><a href="qdomnode.html">QDomNode</a> <a name="setNamedItem"></a>QDomNamedNodeMap::setNamedItem ( const&nbsp;<a href="qdomnode.html">QDomNode</a>&nbsp;&amp;&nbsp;newNode )
174</h3>
175Inserts the node <em>newNode</em> into the named node map. The name used
176by the map is the node name of <em>newNode</em> as returned by
177<a href="qdomnode.html#nodeName">QDomNode::nodeName</a>().
178<p> If the new node replaces an existing node, i.e. the map contains a
179node with the same name, the replaced node is returned.
180<p> <p>See also <a href="#namedItem">namedItem</a>(), <a href="#removeNamedItem">removeNamedItem</a>(), and <a href="#setNamedItemNS">setNamedItemNS</a>().
181
182<h3 class=fn><a href="qdomnode.html">QDomNode</a> <a name="setNamedItemNS"></a>QDomNamedNodeMap::setNamedItemNS ( const&nbsp;<a href="qdomnode.html">QDomNode</a>&nbsp;&amp;&nbsp;newNode )
183</h3>
184Inserts the node <em>newNode</em> in the map. If a node with the same
185namespace URI and the same local name already exists in the map,
186it is replaced by <em>newNode</em>. If the new node replaces an existing
187node, the replaced node is returned.
188<p> <p>See also <a href="#namedItemNS">namedItemNS</a>(), <a href="#removeNamedItemNS">removeNamedItemNS</a>(), and <a href="#setNamedItem">setNamedItem</a>().
189
190<!-- eof -->
191<hr><p>
192This file is part of the <a href="index.html">Qt toolkit</a>.
193Copyright &copy; 1995-2007
194<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
195<table width=100% cellspacing=0 border=0><tr>
196<td>Copyright &copy; 2007
197<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
198<td align=right><div align=right>Qt 3.3.8</div>
199</table></div></address></body>
200</html>
Note: See TracBrowser for help on using the repository browser.