1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445
|
<!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>Qt Toolkit - QDomNode Class</title><style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }body { background: white; color: black; }
--></style>
</head><body bgcolor="#ffffff">
<table width="100%">
<tr><td><a href="index.html">
<img width="100" height="100" src="qtlogo.png"
alt="Home" border="0"><img width="100"
height="100" src="face.png" alt="Home" border="0">
</a><td valign=top><div align=right><img src="dochead.png" width="472" height="27"><br>
<a href="classes.html"><b>Classes</b></a>
-<a href="annotated.html">Annotated</a>
- <a href="hierarchy.html">Tree</a>
-<a href="functions.html">Functions</a>
-<a href="index.html">Home</a>
-<a href="topicals.html"><b>Structure</b></a>
</div>
</table>
<h1 align=center>QDomNode Class Reference<br><small>[ <a href="xml.html">XML module</a> ]</small></h1><br clear="all">
<p>
The QDomNode class is the base class for all nodes of the DOM tree.
<a href="#details">More...</a>
<p>
<code>#include <<a href="qdom-h.html">qdom.h</a>></code>
<p>Inherited by <a href="qdomattr.html">QDomAttr</a>, <a href="qdomcharacterdata.html">QDomCharacterData</a>, <a href="qdomdocument.html">QDomDocument</a>, <a href="qdomdocumentfragment.html">QDomDocumentFragment</a>, <a href="qdomdocumenttype.html">QDomDocumentType</a>, <a href="qdomelement.html">QDomElement</a>, <a href="qdomentity.html">QDomEntity</a>, <a href="qdomentityreference.html">QDomEntityReference</a>, <a href="qdomnotation.html">QDomNotation</a> and <a href="qdomprocessinginstruction.html">QDomProcessingInstruction</a>.
<p><a href="qdomnode-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class="fn">enum<b>NodeType</b>{BaseNode=0, ElementNode=1, AttributeNode=2, TextNode=3, CDATASectionNode=4, EntityReferenceNode=5, EntityNode=6, ProcessingInstructionNode=7, CommentNode=8, DocumentNode=9, DocumentTypeNode=10, DocumentFragmentNode=11, NotationNode=12, CharacterDataNode=13}</div>
<li><div class="fn"><a href="#bddae6"><b>QDomNode</b></a>()</div>
<li><div class="fn"><a href="#da0bf2"><b>QDomNode</b></a>(constQDomNode&)</div>
<li><div class="fn">QDomNode&<a href="#d5e94e"><b>operator=</b></a>(constQDomNode&)</div>
<li><div class="fn">bool<a href="#bbe0fc"><b>operator==</b></a>(constQDomNode&)const</div>
<li><div class="fn">bool<a href="#24b7cf"><b>operator!=</b></a>(constQDomNode&)const</div>
<li><div class="fn">virtual<a href="#63a998"><b>~QDomNode</b></a>()</div>
<li><div class="fn">virtualQString<a href="#70cc89"><b>nodeName</b></a>()const</div>
<li><div class="fn">virtualQString<a href="#ba461d"><b>nodeValue</b></a>()const</div>
<li><div class="fn">virtualvoid<a href="#1e2a4b"><b>setNodeValue</b></a>(constQString&)</div>
<li><div class="fn">virtualQDomNode::NodeType<a href="#46495e"><b>nodeType</b></a>()const</div>
<li><div class="fn">virtualQDomNode<a href="#ff2413"><b>parentNode</b></a>()const</div>
<li><div class="fn">virtualQDomNodeList<a href="#f7052a"><b>childNodes</b></a>()const</div>
<li><div class="fn">virtualQDomNode<a href="#b061e7"><b>firstChild</b></a>()const</div>
<li><div class="fn">virtualQDomNode<a href="#6f8887"><b>lastChild</b></a>()const</div>
<li><div class="fn">virtualQDomNode<a href="#4ac7d3"><b>previousSibling</b></a>()const</div>
<li><div class="fn">virtualQDomNode<a href="#491892"><b>nextSibling</b></a>()const</div>
<li><div class="fn">virtualQDomNamedNodeMap<a href="#0de12a"><b>attributes</b></a>()const</div>
<li><div class="fn">virtualQDomDocument<a href="#3a3219"><b>ownerDocument</b></a>()const</div>
<li><div class="fn">virtualQDomNode<a href="#803362"><b>insertBefore</b></a>(constQDomNode&newChild, constQDomNode&refChild)</div>
<li><div class="fn">virtualQDomNode<a href="#784bea"><b>insertAfter</b></a>(constQDomNode&newChild, constQDomNode&refChild)</div>
<li><div class="fn">virtualQDomNode<a href="#813269"><b>replaceChild</b></a>(constQDomNode&newChild, constQDomNode&oldChild)</div>
<li><div class="fn">virtualQDomNode<a href="#35c7c4"><b>removeChild</b></a>(constQDomNode&oldChild)</div>
<li><div class="fn">virtualQDomNode<a href="#b74d0e"><b>appendChild</b></a>(constQDomNode&newChild)</div>
<li><div class="fn">virtualQDomNode<a href="#8f17f1"><b>cloneNode</b></a>(booldeep=TRUE)const</div>
<li><div class="fn">virtualbool<a href="#c5ede2"><b>isAttr</b></a>()const</div>
<li><div class="fn">virtualbool<a href="#c9c342"><b>isCDATASection</b></a>()const</div>
<li><div class="fn">virtualbool<a href="#8274e8"><b>isDocumentFragment</b></a>()const</div>
<li><div class="fn">virtualbool<a href="#fb265b"><b>isDocument</b></a>()const</div>
<li><div class="fn">virtualbool<a href="#905061"><b>isDocumentType</b></a>()const</div>
<li><div class="fn">virtualbool<a href="#27ec62"><b>isElement</b></a>()const</div>
<li><div class="fn">virtualbool<a href="#43709b"><b>isEntityReference</b></a>()const</div>
<li><div class="fn">virtualbool<a href="#b5b9d5"><b>isText</b></a>()const</div>
<li><div class="fn">virtualbool<a href="#7d3017"><b>isEntity</b></a>()const</div>
<li><div class="fn">virtualbool<a href="#183b0e"><b>isNotation</b></a>()const</div>
<li><div class="fn">virtualbool<a href="#91a7ba"><b>isProcessingInstruction</b></a>()const</div>
<li><div class="fn">virtualbool<a href="#65aedd"><b>isCharacterData</b></a>()const</div>
<li><div class="fn">virtualbool<a href="#1e9417"><b>isComment</b></a>()const</div>
<li><div class="fn">QDomNode<a href="#08fb54"><b>namedItem</b></a>(constQString&name)const</div>
<li><div class="fn">bool<a href="#cb0c9f"><b>isNull</b></a>()const</div>
<li><div class="fn">void<a href="#d11646"><b>clear</b></a>()</div>
<li><div class="fn">QDomAttr<a href="#50ed1e"><b>toAttr</b></a>()</div>
<li><div class="fn">QDomCDATASection<a href="#690fcf"><b>toCDATASection</b></a>()</div>
<li><div class="fn">QDomDocumentFragment<a href="#e8f59f"><b>toDocumentFragment</b></a>()</div>
<li><div class="fn">QDomDocument<a href="#ec2332"><b>toDocument</b></a>()</div>
<li><div class="fn">QDomDocumentType<a href="#cebbb6"><b>toDocumentType</b></a>()</div>
<li><div class="fn">QDomElement<a href="#fb4b8a"><b>toElement</b></a>()</div>
<li><div class="fn">QDomEntityReference<a href="#5dfae7"><b>toEntityReference</b></a>()</div>
<li><div class="fn">QDomText<a href="#c383e9"><b>toText</b></a>()</div>
<li><div class="fn">QDomEntity<a href="#9102b0"><b>toEntity</b></a>()</div>
<li><div class="fn">QDomNotation<a href="#9edfc0"><b>toNotation</b></a>()</div>
<li><div class="fn">QDomProcessingInstruction<a href="#c797df"><b>toProcessingInstruction</b></a>()</div>
<li><div class="fn">QDomCharacterData<a href="#7e1ca0"><b>toCharacterData</b></a>()</div>
<li><div class="fn">QDomComment<a href="#02bbb8"><b>toComment</b></a>()</div>
<li><div class="fn">void<a href="#f03de6"><b>save</b></a>(QTextStream&, int)const</div>
</ul>
<h2>Protected Members</h2>
<ul>
<li><div class="fn"><b>QDomNode</b>(QDOM_NodePrivate*)(internal)</div>
</ul>
<hr><h2><a name="details"></a>Detailed Description</h2>
The QDomNode class is the base class for all nodes of the DOM tree.
<p>
This class is the base class for almost all other classes in the DOM. Many
functions in the DOM return a QDomNode. The various isXxx() functions are
useful to find out the type of the node. A QDomNode can be converted to a
subclass by using the toXxx() function family.
<p>Copies of the QDomNode class share their data; this means modifying one will
change all copies. This is especially useful in combination with functions
which return a QDomNode, e.g. <a href="#b061e7">firstChild</a>(). You can make an independent copy
of the node with <a href="#8f17f1">cloneNode</a>().
<p>The following example looks for the first element in an XML document and
prints its name:
<pre> <a href="qdomdocument.html">QDomDocument</a> d;
d.<a href="qdomdocument.html#6d6711">setContent</a>( someXML );
<a href="qdomnode.html">QDomNode</a> n = d.<a href="#b061e7">firstChild</a>();
while ( !n.<a href="#cb0c9f">isNull</a>() ) {
if ( n.<a href="#27ec62">isElement</a> ) {
<a href="qdomelement.html">QDomElement</a> e = n.<a href="#fb4b8a">toElement</a>();
cout << "The name of the element is " << e.<a href="qdomelement.html#028cbe">tagName</a>() << endl;
return;
}
n = n.<a href="#491892">nextSibling</a>();
}
cout << "no element in the Document" << endl;
</pre>
<p>For further information about the Document Objct Model see
<a href="http://www.w3.org/TR/REC-DOM-Level-1/">http://www.w3.org/TR/REC-DOM-Level-1/</a>.
For a more general introduction of the DOM implementation see the
<a href="qdomdocument.html">QDomDocument</a> documentation.
<hr><h2>Member Function Documentation</h2>
<h3 class="fn"><a name="bddae6"></a>QDomNode::QDomNode()</h3>
<p>Constructs an empty node.
<h3 class="fn"><a name="da0bf2"></a>QDomNode::QDomNode(constQDomNode&<a href="n.html">n</a>)</h3>
<p>Copy constructor.
<p>The data of the copy is shared: modifying one will also change the other. If
you want to make a real copy, use <a href="#8f17f1">cloneNode</a>() instead.
<h3 class="fn"><a name="63a998"></a>QDomNode::~QDomNode() <code>[virtual]</code></h3>
<p>Destructor.
<h3 class="fn">QDomNode<a name="b74d0e"></a>QDomNode::appendChild(constQDomNode&newChild) <code>[virtual]</code></h3>
<p>Appends <em>newChild</em> to the end of the children list.
<p>If <em>newChild</em> is currently child of another parent, then it is reparented.
If <em>newChild</em> is currently a child of this QDomNode, then its position in
the list of children is changed.
<p>Returns a new reference to <em>newChild.</em>
<p>See also <a href="#803362">insertBefore</a>(), <a href="#784bea">insertAfter</a>(), <a href="#813269">replaceChild</a>() and <a href="#35c7c4">removeChild</a>().
<h3 class="fn"><a href="qdomnamednodemap.html">QDomNamedNodeMap</a><a name="0de12a"></a>QDomNode::attributes()const <code>[virtual]</code></h3>
<p>Returns a map of all attributes. Attributes are only provided for
<a href="qdomelement.html">QDomElement</a>.
<p>Changing the attributes in the map will also change the attributes of this
QDomNode.
<p>Reimplemented in <a href="qdomelement.html#65a036">QDomElement</a>.
<h3 class="fn"><a href="qdomnodelist.html">QDomNodeList</a><a name="f7052a"></a>QDomNode::childNodes()const <code>[virtual]</code></h3>
<p>Returns a list of all child nodes.
<p>Most often you will call this function on a <a href="qdomelement.html">QDomElement</a> object.
If the XML document looks like this:
<p><pre> <body>
<h1>Heading</h1>
<p>Hallo <b>you</b></p>
</body>
</pre>
<p>Then the list of child nodes for the "body"-element will contain the node
created by the <h1> tag and the node created by the <p> tag.
<p>The nodes in the list are not copied; so changing the nodes in the list will
also change the children of this node.
<p>See also <a href="#b061e7">firstChild</a>() and <a href="#6f8887">lastChild</a>().
<h3 class="fn">void<a name="d11646"></a>QDomNode::clear()</h3>
<p>Dereferences the internal object. The node is then a null node.
<p>See also <a href="#cb0c9f">isNull</a>().
<h3 class="fn">QDomNode<a name="8f17f1"></a>QDomNode::cloneNode(booldeep=TRUE)const <code>[virtual]</code></h3>
<p>Creates a real copy of the QDomNode.
<p>If <em>deep</em> is TRUE, then the cloning is done recursive.
That means all children are copied, too. Otherwise the cloned
node does not contain child nodes.
<h3 class="fn">QDomNode<a name="b061e7"></a>QDomNode::firstChild()const <code>[virtual]</code></h3>
<p>Returns the first child of the node. If there is no child node, a null node
is returned.
<p>See also <a href="#6f8887">lastChild</a>() and <a href="#f7052a">childNodes</a>().
<h3 class="fn">QDomNode<a name="784bea"></a>QDomNode::insertAfter(constQDomNode&newChild, constQDomNode&refChild) <code>[virtual]</code></h3>
<p>Inserts the node <em>newChild</em> after the child node <em>refChild. refChild</em>
has to be a direct child of this node. If <em>refChild</em> is null then <em>newChild</em> is appended as last child.
<p>If <em>newChild</em> is currently child of another parent, then it is reparented.
If <em>newChild</em> is currently a child of this QDomNode, then its position in
the list of children is changed.
<p>If <em>newChild</em> is a <a href="qdomdocumentfragment.html">QDomDocumentFragment</a>, then the children of the fragment
are removed from the fragment and inserted after <em>refChild.</em>
<p>Returns a new reference to <em>newChild</em> on success or an empty node on failure.
<p>See also <a href="#803362">insertBefore</a>(), <a href="#813269">replaceChild</a>(), <a href="#35c7c4">removeChild</a>() and <a href="#b74d0e">appendChild</a>().
<h3 class="fn">QDomNode<a name="803362"></a>QDomNode::insertBefore(constQDomNode&newChild, constQDomNode&refChild) <code>[virtual]</code></h3>
<p>Inserts the node <em>newChild</em> before the child node <em>refChild. refChild</em>
has to be a direct child of this node. If <em>refChild</em> is null then <em>newChild</em> is inserted as first child.
<p>If <em>newChild</em> is currently child of another parent, then it is reparented.
If <em>newChild</em> is currently a child of this QDomNode, then its position in
the list of children is changed.
<p>If <em>newChild</em> is a <a href="qdomdocumentfragment.html">QDomDocumentFragment</a>, then the children of the fragment
are removed from the fragment and inserted after <em>refChild.</em>
<p>Returns a new reference to <em>newChild</em> on success or an empty node on
failure.
<p>See also <a href="#784bea">insertAfter</a>(), <a href="#813269">replaceChild</a>(), <a href="#35c7c4">removeChild</a>() and <a href="#b74d0e">appendChild</a>().
<h3 class="fn">bool<a name="c5ede2"></a>QDomNode::isAttr()const <code>[virtual]</code></h3>
<p>Returns TRUE if the node is an attribute, otherwise FALSE.
<p>If this function returns TRUE, this does not imply that this object is
a QDomAttribute; you can get the QDomAttribute with toAttribute().
<p>See also toAttribute().
<p>Reimplemented in <a href="qdomattr.html#b76ec6">QDomAttr</a>.
<h3 class="fn">bool<a name="c9c342"></a>QDomNode::isCDATASection()const <code>[virtual]</code></h3>
<p>Returns TRUE if the node is a CDATA section, otherwise FALSE.
<p>If this function returns TRUE, this does not imply that this object is
a <a href="qdomcdatasection.html">QDomCDATASection</a>; you can get the QDomCDATASection with <a href="#690fcf">toCDATASection</a>().
<p>See also <a href="#690fcf">toCDATASection</a>().
<p>Reimplemented in <a href="qdomcdatasection.html#9a8405">QDomCDATASection</a>.
<h3 class="fn">bool<a name="65aedd"></a>QDomNode::isCharacterData()const <code>[virtual]</code></h3>
<p>Returns TRUE if the node is a character data node, otherwise FALSE.
<p>If this function returns TRUE, this does not imply that this object is
a <a href="qdomcharacterdata.html">QDomCharacterData</a>; you can get the QDomCharacterData with
<a href="#7e1ca0">toCharacterData</a>().
<p>See also <a href="#7e1ca0">toCharacterData</a>().
<p>Reimplemented in <a href="qdomcharacterdata.html#ad2bfe">QDomCharacterData</a>.
<h3 class="fn">bool<a name="1e9417"></a>QDomNode::isComment()const <code>[virtual]</code></h3>
<p>Returns TRUE if the node is a comment, otherwise FALSE.
<p>If this function returns TRUE, this does not imply that this object is
a <a href="qdomcomment.html">QDomComment</a>; you can get the QDomComment with <a href="#02bbb8">toComment</a>().
<p>See also <a href="#02bbb8">toComment</a>().
<p>Reimplemented in <a href="qdomcomment.html#bfffe6">QDomComment</a>.
<h3 class="fn">bool<a name="fb265b"></a>QDomNode::isDocument()const <code>[virtual]</code></h3>
<p>Returns TRUE if the node is a document, otherwise FALSE.
<p>If this function returns TRUE, this does not imply that this object is
a <a href="qdomdocument.html">QDomDocument</a>; you can get the QDomDocument with <a href="#ec2332">toDocument</a>().
<p>See also <a href="#ec2332">toDocument</a>().
<p>Reimplemented in <a href="qdomdocument.html#d2d187">QDomDocument</a>.
<h3 class="fn">bool<a name="8274e8"></a>QDomNode::isDocumentFragment()const <code>[virtual]</code></h3>
<p>Returns TRUE if the node is a document fragment, otherwise FALSE.
<p>If this function returns TRUE, this does not imply that this object is
a <a href="qdomdocumentfragment.html">QDomDocumentFragment</a>; you can get the QDomDocumentFragment with
<a href="#e8f59f">toDocumentFragment</a>().
<p>See also <a href="#e8f59f">toDocumentFragment</a>().
<p>Reimplemented in <a href="qdomdocumentfragment.html#b52632">QDomDocumentFragment</a>.
<h3 class="fn">bool<a name="905061"></a>QDomNode::isDocumentType()const <code>[virtual]</code></h3>
<p>Returns TRUE if the node is a document type, otherwise FALSE.
<p>If this function returns TRUE, this does not imply that this object is
a <a href="qdomdocumenttype.html">QDomDocumentType</a>; you can get the QDomDocumentType with <a href="#cebbb6">toDocumentType</a>().
<p>See also <a href="#cebbb6">toDocumentType</a>().
<p>Reimplemented in <a href="qdomdocumenttype.html#eaa54e">QDomDocumentType</a>.
<h3 class="fn">bool<a name="27ec62"></a>QDomNode::isElement()const <code>[virtual]</code></h3>
<p>Returns TRUE if the node is an element, otherwise FALSE.
<p>If this function returns TRUE, this does not imply that this object is
a <a href="qdomelement.html">QDomElement</a>; you can get the QDomElement with <a href="#fb4b8a">toElement</a>().
<p>See also <a href="#fb4b8a">toElement</a>().
<p>Reimplemented in <a href="qdomelement.html#42958b">QDomElement</a>.
<h3 class="fn">bool<a name="7d3017"></a>QDomNode::isEntity()const <code>[virtual]</code></h3>
<p>Returns TRUE if the node is an entity, otherwise FALSE.
<p>If this function returns TRUE, this does not imply that this object is
a <a href="qdomentity.html">QDomEntity</a>; you can get the QDomEntity with <a href="#9102b0">toEntity</a>().
<p>See also <a href="#9102b0">toEntity</a>().
<p>Reimplemented in <a href="qdomentity.html#8f848b">QDomEntity</a>.
<h3 class="fn">bool<a name="43709b"></a>QDomNode::isEntityReference()const <code>[virtual]</code></h3>
<p>Returns TRUE if the node is an entity reference, otherwise FALSE.
<p>If this function returns TRUE, this does not imply that this object is
a <a href="qdomentityreference.html">QDomEntityReference</a>; you can get the QDomEntityReference with
<a href="#5dfae7">toEntityReference</a>().
<p>See also <a href="#5dfae7">toEntityReference</a>().
<p>Reimplemented in <a href="qdomentityreference.html#214769">QDomEntityReference</a>.
<h3 class="fn">bool<a name="183b0e"></a>QDomNode::isNotation()const <code>[virtual]</code></h3>
<p>Returns TRUE if the node is a notation, otherwise FALSE.
<p>If this function returns TRUE, this does not imply that this object is
a <a href="qdomnotation.html">QDomNotation</a>; you can get the QDomNotation with <a href="#9edfc0">toNotation</a>().
<p>See also <a href="#9edfc0">toNotation</a>().
<p>Reimplemented in <a href="qdomnotation.html#2b0e52">QDomNotation</a>.
<h3 class="fn">bool<a name="cb0c9f"></a>QDomNode::isNull()const</h3>
<p>Returns TRUE if this node does not reference any internal object, otherwise
FALSE.
<h3 class="fn">bool<a name="91a7ba"></a>QDomNode::isProcessingInstruction()const <code>[virtual]</code></h3>
<p>Returns TRUE if the node is a processing instruction, otherwise FALSE.
<p>If this function returns TRUE, this does not imply that this object is
a <a href="qdomprocessinginstruction.html">QDomProcessingInstruction</a>; you can get the QProcessingInstruction with
<a href="#c797df">toProcessingInstruction</a>().
<p>See also <a href="#c797df">toProcessingInstruction</a>().
<p>Reimplemented in <a href="qdomprocessinginstruction.html#fc1c67">QDomProcessingInstruction</a>.
<h3 class="fn">bool<a name="b5b9d5"></a>QDomNode::isText()const <code>[virtual]</code></h3>
<p>Returns TRUE if the node is a text, otherwise FALSE.
<p>If this function returns TRUE, this does not imply that this object is
a <a href="qdomtext.html">QDomText</a>; you can get the QDomText with <a href="#c383e9">toText</a>().
<p>See also <a href="#c383e9">toText</a>().
<p>Reimplemented in <a href="qdomtext.html#92c2d4">QDomText</a>.
<h3 class="fn">QDomNode<a name="6f8887"></a>QDomNode::lastChild()const <code>[virtual]</code></h3>
<p>Returns the last child of the node. If there is no child node then a null
node is returned.
<p>See also <a href="#b061e7">firstChild</a>() and <a href="#f7052a">childNodes</a>().
<h3 class="fn">QDomNode<a name="08fb54"></a>QDomNode::namedItem(const<a href="qstring.html">QString</a>&name)const</h3>
<p>Returns the first child node for which <a href="#70cc89">nodeName</a>() equals <em>name.</em>
<p>If no such direct child exists, a null node is returned.
<p>See also <a href="#70cc89">nodeName</a>().
<h3 class="fn">QDomNode<a name="491892"></a>QDomNode::nextSibling()const <code>[virtual]</code></h3>
<p>Returns the next sibling in the document tree. Changing the returned node
will also change the node in the document tree.
<p>If you have XML like this:
<pre> <h1>Heading</h1>
<p>The text...</p>
<h2>Next heading</h2>
</pre>
<p>and this QDomNode represents the <p> tag, the nextSibling
will return the node representing the <h2> tag.
<p>See also <a href="#4ac7d3">previousSibling</a>().
<h3 class="fn"><a href="qstring.html">QString</a><a name="70cc89"></a>QDomNode::nodeName()const <code>[virtual]</code></h3>
<p>Returns the name of the node.
<p>The meaning of the name depends on the subclass:
<p><ul>
<li> <a href="qdomelement.html">QDomElement</a> - the tag name
<li> <a href="qdomattr.html">QDomAttr</a> - the name of the attribute
<li> <a href="qdomtext.html">QDomText</a> - the string "#text"
<li> <a href="qdomcdatasection.html">QDomCDATASection</a> - the string "#cdata-section"
<li> <a href="qdomentityreference.html">QDomEntityReference</a> - the name of the referenced entity
<li> <a href="qdomentity.html">QDomEntity</a> - the name of the entity
<li> <a href="qdomprocessinginstruction.html">QDomProcessingInstruction</a> - the target of the processing instruction
<li> <a href="qdomdocument.html">QDomDocument</a> - the string "#document"
<li> <a href="qdomcomment.html">QDomComment</a> - the string "#comment"
<li> <a href="qdomdocumenttype.html">QDomDocumentType</a> - the name of the document type
<li> <a href="qdomdocumentfragment.html">QDomDocumentFragment</a> - the string "#document-fragment"
<li> <a href="qdomnotation.html">QDomNotation</a> - the name of the notation
</ul>
<p>See also <a href="#ba461d">nodeValue</a>().
<h3 class="fn">QDomNode::NodeType<a name="46495e"></a>QDomNode::nodeType()const <code>[virtual]</code></h3>
<p>Returns the type of the node.
<p>See also <a href="#50ed1e">toAttr</a>(), <a href="#690fcf">toCDATASection</a>(), <a href="#e8f59f">toDocumentFragment</a>(), <a href="#ec2332">toDocument</a>(), <a href="#cebbb6">toDocumentType</a>(), <a href="#fb4b8a">toElement</a>(), <a href="#5dfae7">toEntityReference</a>(), <a href="#c383e9">toText</a>(), <a href="#9102b0">toEntity</a>(), <a href="#9edfc0">toNotation</a>(), <a href="#c797df">toProcessingInstruction</a>(), <a href="#7e1ca0">toCharacterData</a>() and <a href="#02bbb8">toComment</a>().
<p>Reimplemented in <a href="qdomdocumenttype.html#0c4ce0">QDomDocumentType</a>, <a href="qdomcomment.html#0559c6">QDomComment</a>, <a href="qdomdocument.html#d63184">QDomDocument</a>, <a href="qdomelement.html#927d34">QDomElement</a>, <a href="qdomdocumentfragment.html#8edf5c">QDomDocumentFragment</a>, <a href="qdomnotation.html#5371d4">QDomNotation</a>, <a href="qdomentityreference.html#27ea09">QDomEntityReference</a>, <a href="qdomprocessinginstruction.html#52cfab">QDomProcessingInstruction</a>, <a href="qdomattr.html#036b00">QDomAttr</a>, <a href="qdomcharacterdata.html#40784b">QDomCharacterData</a>, <a href="qdomentity.html#e7b74c">QDomEntity</a>, <a href="qdomtext.html#3a04e5">QDomText</a> and <a href="qdomcdatasection.html#c4afc9">QDomCDATASection</a>.
<h3 class="fn"><a href="qstring.html">QString</a><a name="ba461d"></a>QDomNode::nodeValue()const <code>[virtual]</code></h3>
<p>Returns the value of the node.
<p>The meaning of the value depends on the subclass:
<p><ul>
<li> <a href="qdomattr.html">QDomAttr</a> - the attribute value
<li> <a href="qdomtext.html">QDomText</a> - the text
<li> <a href="qdomcdatasection.html">QDomCDATASection</a> - the content of the CDATA section
<li> <a href="qdomprocessinginstruction.html">QDomProcessingInstruction</a> - the data of the processing intruction
<li> <a href="qdomcomment.html">QDomComment</a> - the comment
</ul>
<p>All other subclasses not listed above do not have a node value. These classes
will return a null string.
<p>See also <a href="#1e2a4b">setNodeValue</a>() and <a href="#70cc89">nodeName</a>().
<h3 class="fn">bool<a name="24b7cf"></a>QDomNode::operator!=(constQDomNode&<a href="n.html">n</a>)const</h3>
<p>Returns TRUE if the two nodes are not equal, otherwise FALSE.
<h3 class="fn">QDomNode&<a name="d5e94e"></a>QDomNode::operator=(constQDomNode&<a href="n.html">n</a>)</h3>
<p>Assignment operator.
<p>The data of the copy is shared: modifying one will also change the other. If
you want to make a real copy, use <a href="#8f17f1">cloneNode</a>() instead.
<h3 class="fn">bool<a name="bbe0fc"></a>QDomNode::operator==(constQDomNode&<a href="n.html">n</a>)const</h3>
<p>Returns TRUE if the two nodes are equal, otherwise FALSE.
<h3 class="fn"><a href="qdomdocument.html">QDomDocument</a><a name="3a3219"></a>QDomNode::ownerDocument()const <code>[virtual]</code></h3>
<p>Returns the document to which this node belongs.
<h3 class="fn">QDomNode<a name="ff2413"></a>QDomNode::parentNode()const <code>[virtual]</code></h3>
<p>Returns the parent node, If this node has no parent, then a null node is
returned (i.e. a node for which <a href="#cb0c9f">isNull</a>() returns TRUE).
<h3 class="fn">QDomNode<a name="4ac7d3"></a>QDomNode::previousSibling()const <code>[virtual]</code></h3>
<p>Returns the previous sibling in the document tree. Changing the returned node
will also change the node in the document tree.
<p>If you have XML like this:
<pre> <h1>Heading</h1>
<p>The text...</p>
<h2>Next heading</h2>
</pre>
<p>and this QDomNode represents the <p> tag, the previousSibling
will return the node representing the <h1> tag.
<p>See also <a href="#491892">nextSibling</a>().
<h3 class="fn">QDomNode<a name="35c7c4"></a>QDomNode::removeChild(constQDomNode&oldChild) <code>[virtual]</code></h3>
<p>Removes <em>oldChild</em> from the list of children.
<em>oldChild</em> has to be a direct child of this node.
<p>Returns a new reference to <em>oldChild</em> on success or a null node on failure.
<p>See also <a href="#803362">insertBefore</a>(), <a href="#784bea">insertAfter</a>(), <a href="#813269">replaceChild</a>() and <a href="#b74d0e">appendChild</a>().
<h3 class="fn">QDomNode<a name="813269"></a>QDomNode::replaceChild(constQDomNode&newChild, constQDomNode&oldChild) <code>[virtual]</code></h3>
<p>Replaces <em>oldChild</em> with <em>newChild. oldChild</em> has to be a direct child
of this node.
<p>If <em>newChild</em> is currently child of another parent, then it is reparented.
If <em>newChild</em> is currently a child of this QDomNode, then its position in
the list of children is changed.
<p>If <em>newChild</em> is a <a href="qdomdocumentfragment.html">QDomDocumentFragment</a>, then the children of the fragment
are removed from the fragment and inserted after <em>refChild.</em>
<p>Returns a new reference to <em>oldChild</em> on success or a null node an failure.
<p>See also <a href="#803362">insertBefore</a>(), <a href="#784bea">insertAfter</a>(), <a href="#35c7c4">removeChild</a>() and <a href="#b74d0e">appendChild</a>().
<h3 class="fn">void<a name="f03de6"></a>QDomNode::save(<a href="qtextstream.html">QTextStream</a>&str, intindent)const</h3>
<p>Writes the XML representation of the node including all its children
on the stream.
<h3 class="fn">void<a name="1e2a4b"></a>QDomNode::setNodeValue(const<a href="qstring.html">QString</a>&v) <code>[virtual]</code></h3>
<p>Sets the value of the node to <em>v.</em>
<p>See also <a href="#ba461d">nodeValue</a>().
<h3 class="fn"><a href="qdomattr.html">QDomAttr</a><a name="50ed1e"></a>QDomNode::toAttr()</h3>
<p>Converts a QDomNode into a <a href="qdomattr.html">QDomAttr</a>. If the node is not an attribute,
the returned object will be null.
<p>See also <a href="#c5ede2">isAttr</a>().
<h3 class="fn"><a href="qdomcdatasection.html">QDomCDATASection</a><a name="690fcf"></a>QDomNode::toCDATASection()</h3>
<p>Converts a QDomNode into a <a href="qdomcdatasection.html">QDomCDATASection</a>. If the node is not a CDATA
section, the returned object will be null.
<p>See also <a href="#c9c342">isCDATASection</a>().
<h3 class="fn"><a href="qdomcharacterdata.html">QDomCharacterData</a><a name="7e1ca0"></a>QDomNode::toCharacterData()</h3>
<p>Converts a QDomNode into a <a href="qdomcharacterdata.html">QDomCharacterData</a>. If the node is not a character
data node the returned object will be null.
<p>See also <a href="#65aedd">isCharacterData</a>().
<h3 class="fn"><a href="qdomcomment.html">QDomComment</a><a name="02bbb8"></a>QDomNode::toComment()</h3>
<p>Converts a QDomNode into a <a href="qdomcomment.html">QDomComment</a>. If the node is not a comment the
returned object will be null.
<p>See also <a href="#1e9417">isComment</a>().
<h3 class="fn"><a href="qdomdocument.html">QDomDocument</a><a name="ec2332"></a>QDomNode::toDocument()</h3>
<p>Converts a QDomNode into a <a href="qdomdocument.html">QDomDocument</a>. If the node is not a document
the returned object will be null.
<p>See also <a href="#fb265b">isDocument</a>().
<h3 class="fn"><a href="qdomdocumentfragment.html">QDomDocumentFragment</a><a name="e8f59f"></a>QDomNode::toDocumentFragment()</h3>
<p>Converts a QDomNode into a <a href="qdomdocumentfragment.html">QDomDocumentFragment</a>. If the node is not a
document fragment the returned object will be null.
<p>See also <a href="#8274e8">isDocumentFragment</a>().
<h3 class="fn"><a href="qdomdocumenttype.html">QDomDocumentType</a><a name="cebbb6"></a>QDomNode::toDocumentType()</h3>
<p>Converts a QDomNode into a <a href="qdomdocumenttype.html">QDomDocumentType</a>. If the node is not a document
type the returned object will be null.
<p>See also <a href="#905061">isDocumentType</a>().
<h3 class="fn"><a href="qdomelement.html">QDomElement</a><a name="fb4b8a"></a>QDomNode::toElement()</h3>
<p>Converts a QDomNode into a <a href="qdomelement.html">QDomElement</a>. If the node is not an element
the returned object will be null.
<p>See also <a href="#27ec62">isElement</a>().
<h3 class="fn"><a href="qdomentity.html">QDomEntity</a><a name="9102b0"></a>QDomNode::toEntity()</h3>
<p>Converts a QDomNode into a <a href="qdomentity.html">QDomEntity</a>. If the node is not an entity the
returned object will be null.
<p>See also <a href="#7d3017">isEntity</a>().
<h3 class="fn"><a href="qdomentityreference.html">QDomEntityReference</a><a name="5dfae7"></a>QDomNode::toEntityReference()</h3>
<p>Converts a QDomNode into a <a href="qdomentityreference.html">QDomEntityReference</a>. If the node is not an entity
reference, the returned object will be null.
<p>See also <a href="#43709b">isEntityReference</a>().
<h3 class="fn"><a href="qdomnotation.html">QDomNotation</a><a name="9edfc0"></a>QDomNode::toNotation()</h3>
<p>Converts a QDomNode into a <a href="qdomnotation.html">QDomNotation</a>. If the node is not a notation
the returned object will be null.
<p>See also <a href="#183b0e">isNotation</a>().
<h3 class="fn"><a href="qdomprocessinginstruction.html">QDomProcessingInstruction</a><a name="c797df"></a>QDomNode::toProcessingInstruction()</h3>
<p>Converts a QDomNode into a <a href="qdomprocessinginstruction.html">QDomProcessingInstruction</a>. If the node is not a
processing instruction the returned object will be null.
<p>See also <a href="#91a7ba">isProcessingInstruction</a>().
<h3 class="fn"><a href="qdomtext.html">QDomText</a><a name="c383e9"></a>QDomNode::toText()</h3>
<p>Converts a QDomNode into a <a href="qdomtext.html">QDomText</a>. If the node is not a text, the returned
object will be null.
<p>See also <a href="#b5b9d5">isText</a>().
<h3 class="fn"><a name="cea017"></a>QDomNode::QDomNode(QDOM_NodePrivate*<a href="n.html">n</a>) <code>[protected]</code></h3>
<p>For internal use only.
<hr><p>
Search the documentation, FAQ, qt-interest archive and more (uses
<a href="http://www.trolltech.com">www.trolltech.com</a>):<br>
<form method=post action="http://www.trolltech.com/search.cgi">
<input type=hidden name="version" value="2.3.2"><nobr>
<input size="50" name="search"><input type=submit value="Search">
</nobr></form><hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>,
copyright © 1995-2001
<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 2001 Trolltech<td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align="right"><div align="right">Qt version 2.3.2</div>
</table></div></address></body></html>
|