File: qdomnode.html

package info (click to toggle)
python-qt4 4.12.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 40,300 kB
  • ctags: 6,185
  • sloc: python: 125,988; cpp: 13,291; xml: 292; makefile: 246; php: 27; sh: 2
file content (785 lines) | stat: -rw-r--r-- 60,286 bytes parent folder | download
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
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QDomNode Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QDomNode Class Reference<br /><sup><sup>[<a href="qtxml.html">QtXml</a> module]</sup></sup></h1><p>The QDomNode class is the base class for all the nodes in a DOM
tree. <a href="#details">More...</a></p>

<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><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qdomnode.html#EncodingPolicy-enum">EncodingPolicy</a></b> { EncodingFromDocument, EncodingFromTextStream }</li><li><div class="fn" />enum <b><a href="qdomnode.html#NodeType-enum">NodeType</a></b> { ElementNode, AttributeNode, TextNode, CDATASectionNode, ..., CharacterDataNode }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qdomnode.html#QDomNode">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdomnode.html#QDomNode-2">__init__</a></b> (<i>self</i>, QDomNode)</li><li><div class="fn" />QDomNode <b><a href="qdomnode.html#appendChild">appendChild</a></b> (<i>self</i>, QDomNode&#160;<i>newChild</i>)</li><li><div class="fn" />QDomNamedNodeMap <b><a href="qdomnode.html#attributes">attributes</a></b> (<i>self</i>)</li><li><div class="fn" />QDomNodeList <b><a href="qdomnode.html#childNodes">childNodes</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdomnode.html#clear">clear</a></b> (<i>self</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnode.html#cloneNode">cloneNode</a></b> (<i>self</i>, bool&#160;<i>deep</i>&#160;=&#160;True)</li><li><div class="fn" />int <b><a href="qdomnode.html#columnNumber">columnNumber</a></b> (<i>self</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnode.html#firstChild">firstChild</a></b> (<i>self</i>)</li><li><div class="fn" />QDomElement <b><a href="qdomnode.html#firstChildElement">firstChildElement</a></b> (<i>self</i>, QString&#160;<i>tagName</i>&#160;=&#160;'')</li><li><div class="fn" />bool <b><a href="qdomnode.html#hasAttributes">hasAttributes</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdomnode.html#hasChildNodes">hasChildNodes</a></b> (<i>self</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnode.html#insertAfter">insertAfter</a></b> (<i>self</i>, QDomNode&#160;<i>newChild</i>, QDomNode&#160;<i>refChild</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnode.html#insertBefore">insertBefore</a></b> (<i>self</i>, QDomNode&#160;<i>newChild</i>, QDomNode&#160;<i>refChild</i>)</li><li><div class="fn" />bool <b><a href="qdomnode.html#isAttr">isAttr</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdomnode.html#isCDATASection">isCDATASection</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdomnode.html#isCharacterData">isCharacterData</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdomnode.html#isComment">isComment</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdomnode.html#isDocument">isDocument</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdomnode.html#isDocumentFragment">isDocumentFragment</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdomnode.html#isDocumentType">isDocumentType</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdomnode.html#isElement">isElement</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdomnode.html#isEntity">isEntity</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdomnode.html#isEntityReference">isEntityReference</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdomnode.html#isNotation">isNotation</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdomnode.html#isNull">isNull</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdomnode.html#isProcessingInstruction">isProcessingInstruction</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdomnode.html#isSupported">isSupported</a></b> (<i>self</i>, QString&#160;<i>feature</i>, QString&#160;<i>version</i>)</li><li><div class="fn" />bool <b><a href="qdomnode.html#isText">isText</a></b> (<i>self</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnode.html#lastChild">lastChild</a></b> (<i>self</i>)</li><li><div class="fn" />QDomElement <b><a href="qdomnode.html#lastChildElement">lastChildElement</a></b> (<i>self</i>, QString&#160;<i>tagName</i>&#160;=&#160;'')</li><li><div class="fn" />int <b><a href="qdomnode.html#lineNumber">lineNumber</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qdomnode.html#localName">localName</a></b> (<i>self</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnode.html#namedItem">namedItem</a></b> (<i>self</i>, QString&#160;<i>name</i>)</li><li><div class="fn" />QString <b><a href="qdomnode.html#namespaceURI">namespaceURI</a></b> (<i>self</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnode.html#nextSibling">nextSibling</a></b> (<i>self</i>)</li><li><div class="fn" />QDomElement <b><a href="qdomnode.html#nextSiblingElement">nextSiblingElement</a></b> (<i>self</i>, QString&#160;<i>tagName</i>&#160;=&#160;'')</li><li><div class="fn" />QString <b><a href="qdomnode.html#nodeName">nodeName</a></b> (<i>self</i>)</li><li><div class="fn" />NodeType <b><a href="qdomnode.html#nodeType">nodeType</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qdomnode.html#nodeValue">nodeValue</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdomnode.html#normalize">normalize</a></b> (<i>self</i>)</li><li><div class="fn" />QDomDocument <b><a href="qdomnode.html#ownerDocument">ownerDocument</a></b> (<i>self</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnode.html#parentNode">parentNode</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qdomnode.html#prefix">prefix</a></b> (<i>self</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnode.html#previousSibling">previousSibling</a></b> (<i>self</i>)</li><li><div class="fn" />QDomElement <b><a href="qdomnode.html#previousSiblingElement">previousSiblingElement</a></b> (<i>self</i>, QString&#160;<i>tagName</i>&#160;=&#160;'')</li><li><div class="fn" />QDomNode <b><a href="qdomnode.html#removeChild">removeChild</a></b> (<i>self</i>, QDomNode&#160;<i>oldChild</i>)</li><li><div class="fn" />QDomNode <b><a href="qdomnode.html#replaceChild">replaceChild</a></b> (<i>self</i>, QDomNode&#160;<i>newChild</i>, QDomNode&#160;<i>oldChild</i>)</li><li><div class="fn" /><b><a href="qdomnode.html#save">save</a></b> (<i>self</i>, QTextStream, int)</li><li><div class="fn" /><b><a href="qdomnode.html#save-2">save</a></b> (<i>self</i>, QTextStream, int, EncodingPolicy)</li><li><div class="fn" /><b><a href="qdomnode.html#setNodeValue">setNodeValue</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qdomnode.html#setPrefix">setPrefix</a></b> (<i>self</i>, QString&#160;<i>pre</i>)</li><li><div class="fn" />QDomAttr <b><a href="qdomnode.html#toAttr">toAttr</a></b> (<i>self</i>)</li><li><div class="fn" />QDomCDATASection <b><a href="qdomnode.html#toCDATASection">toCDATASection</a></b> (<i>self</i>)</li><li><div class="fn" />QDomCharacterData <b><a href="qdomnode.html#toCharacterData">toCharacterData</a></b> (<i>self</i>)</li><li><div class="fn" />QDomComment <b><a href="qdomnode.html#toComment">toComment</a></b> (<i>self</i>)</li><li><div class="fn" />QDomDocument <b><a href="qdomnode.html#toDocument">toDocument</a></b> (<i>self</i>)</li><li><div class="fn" />QDomDocumentFragment <b><a href="qdomnode.html#toDocumentFragment">toDocumentFragment</a></b> (<i>self</i>)</li><li><div class="fn" />QDomDocumentType <b><a href="qdomnode.html#toDocumentType">toDocumentType</a></b> (<i>self</i>)</li><li><div class="fn" />QDomElement <b><a href="qdomnode.html#toElement">toElement</a></b> (<i>self</i>)</li><li><div class="fn" />QDomEntity <b><a href="qdomnode.html#toEntity">toEntity</a></b> (<i>self</i>)</li><li><div class="fn" />QDomEntityReference <b><a href="qdomnode.html#toEntityReference">toEntityReference</a></b> (<i>self</i>)</li><li><div class="fn" />QDomNotation <b><a href="qdomnode.html#toNotation">toNotation</a></b> (<i>self</i>)</li><li><div class="fn" />QDomProcessingInstruction <b><a href="qdomnode.html#toProcessingInstruction">toProcessingInstruction</a></b> (<i>self</i>)</li><li><div class="fn" />QDomText <b><a href="qdomnode.html#toText">toText</a></b> (<i>self</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qdomnode.html#__eq__">__eq__</a></b> (<i>self</i>, QDomNode)</li><li><div class="fn" />bool <b><a href="qdomnode.html#__ne__">__ne__</a></b> (<i>self</i>, QDomNode)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QDomNode class is the base class for all the nodes in a DOM
tree.</p>
<p>Many functions in the DOM return a QDomNode.</p>
<p>You can find out the type of a node using <a href="qdomnode.html#isAttr">isAttr</a>(), <a href="qdomnode.html#isCDATASection">isCDATASection</a>(), <a href="qdomnode.html#isDocumentFragment">isDocumentFragment</a>(),
<a href="qdomnode.html#isDocument">isDocument</a>(), <a href="qdomnode.html#isDocumentType">isDocumentType</a>(), <a href="qdomnode.html#isElement">isElement</a>(), <a href="qdomnode.html#isEntityReference">isEntityReference</a>(), <a href="qdomnode.html#isText">isText</a>(), <a href="qdomnode.html#isEntity">isEntity</a>(), <a href="qdomnode.html#isNotation">isNotation</a>(), <a href="qdomnode.html#isProcessingInstruction">isProcessingInstruction</a>(),
<a href="qdomnode.html#isCharacterData">isCharacterData</a>() and
<a href="qdomnode.html#isComment">isComment</a>().</p>
<p>A QDomNode can be converted into one of its subclasses using
<a href="qdomnode.html#toAttr">toAttr</a>(), <a href="qdomnode.html#toCDATASection">toCDATASection</a>(), <a href="qdomnode.html#toDocumentFragment">toDocumentFragment</a>(),
<a href="qdomnode.html#toDocument">toDocument</a>(), <a href="qdomnode.html#toDocumentType">toDocumentType</a>(), <a href="qdomnode.html#toElement">toElement</a>(), <a href="qdomnode.html#toEntityReference">toEntityReference</a>(), <a href="qdomnode.html#toText">toText</a>(), <a href="qdomnode.html#toEntity">toEntity</a>(), <a href="qdomnode.html#toNotation">toNotation</a>(), <a href="qdomnode.html#toProcessingInstruction">toProcessingInstruction</a>(),
<a href="qdomnode.html#toCharacterData">toCharacterData</a>() or
<a href="qdomnode.html#toComment">toComment</a>(). You can convert
a node to a null node with <a href="qdomnode.html#clear">clear</a>().</p>
<p>Copies of the QDomNode class share their data using explicit
sharing. This means that modifying one node will change all copies.
This is especially useful in combination with functions which
return a QDomNode, e.g. <a href="qdomnode.html#firstChild">firstChild</a>(). You can make an
independent (deep) copy of the node with <a href="qdomnode.html#cloneNode">cloneNode</a>().</p>
<p>A QDomNode can be null, much like a null pointer. Creating a
copy of a null node results in another null node. It is not
possible to modify a null node, but it is possible to assign
another, possibly non-null node to it. In this case, the copy of
the null node will remain null. You can check if a QDomNode is null
by calling <a href="qdomnode.html#isNull">isNull</a>(). The empty
constructor of a QDomNode (or any of the derived classes) creates a
null node.</p>
<p>Nodes are inserted with <a href="qdomnode.html#insertBefore">insertBefore</a>(), <a href="qdomnode.html#insertAfter">insertAfter</a>() or <a href="qdomnode.html#appendChild">appendChild</a>(). You can replace one
node with another using <a href="qdomnode.html#replaceChild">replaceChild</a>() and remove a node
with <a href="qdomnode.html#removeChild">removeChild</a>().</p>
<p>To traverse nodes use <a href="qdomnode.html#firstChild">firstChild</a>() to get a node's first
child (if any), and <a href="qdomnode.html#nextSibling">nextSibling</a>() to traverse. QDomNode
also provides <a href="qdomnode.html#lastChild">lastChild</a>(),
<a href="qdomnode.html#previousSibling">previousSibling</a>() and
<a href="qdomnode.html#parentNode">parentNode</a>(). To find the
first child node with a particular node name use <a href="qdomnode.html#namedItem">namedItem</a>().</p>
<p>To find out if a node has children use <a href="qdomnode.html#hasChildNodes">hasChildNodes</a>() and to get a list
of all of a node's children use <a href="qdomnode.html#childNodes">childNodes</a>().</p>
<p>The node's name and value (the meaning of which varies depending
on its type) is returned by <a href="qdomnode.html#nodeName">nodeName</a>() and <a href="qdomnode.html#nodeValue">nodeValue</a>() respectively. The node's
type is returned by <a href="qdomnode.html#nodeType">nodeType</a>(). The node's value can be
set with <a href="qdomnode.html#setNodeValue">setNodeValue</a>().</p>
<p>The document to which the node belongs is returned by <a href="qdomnode.html#ownerDocument">ownerDocument</a>().</p>
<p>Adjacent <a href="qdomtext.html">QDomText</a> nodes can be
merged into a single node with <a href="qdomnode.html#normalize">normalize</a>().</p>
<p><a href="qdomelement.html">QDomElement</a> nodes have attributes
which can be retrieved with <a href="qdomnode.html#attributes">attributes</a>().</p>
<p><a href="qdomelement.html">QDomElement</a> and <a href="qdomattr.html">QDomAttr</a> nodes can have namespaces which can be
retrieved with <a href="qdomnode.html#namespaceURIx">namespaceURI</a>(). Their local name
is retrieved with <a href="qdomnode.html#localName">localName</a>(), and their prefix with
<a href="qdomnode.html#prefix">prefix</a>(). The prefix can be set
with <a href="qdomnode.html#setPrefix">setPrefix</a>().</p>
<p>You can write the XML representation of the node to a text
stream with <a href="qdomnode.html#save">save</a>().</p>
<p>The following example looks for the first element in an XML
document and prints the names of all the elements that are its
direct children.</p>
<pre class="cpp">
 <span class="type"><a href="qdomdocument.html">QDomDocument</a></span> d;
 d<span class="operator">.</span>setContent(someXML);
 <span class="type">QDomNode</span> n <span class="operator">=</span> d<span class="operator">.</span><a href="qdomnode.html#firstChild">firstChild</a>();
 <span class="keyword">while</span> (<span class="operator">!</span>n<span class="operator">.</span>isNull()) {
     <span class="keyword">if</span> (n<span class="operator">.</span>isElement()) {
         <span class="type"><a href="qdomelement.html">QDomElement</a></span> e <span class="operator">=</span> n<span class="operator">.</span>toElement();
         cout <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="string">"Element name: "</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> e<span class="operator">.</span>tagName() <span class="operator">&lt;</span><span class="operator">&lt;</span> endl;
         <span class="keyword">break</span>;
     }
     n <span class="operator">=</span> n<span class="operator">.</span>nextSibling();
 }
</pre>
<p>For further information about the Document Object Model see
<a href="http://www.w3.org/TR/REC-DOM-Level-1/">Level 1</a> and
<a href="http://www.w3.org/TR/DOM-Level-2-Core/">Level 2 Core</a>.
For a more general introduction of the DOM implementation see the
<a href="qdomdocument.html">QDomDocument</a> documentation.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="EncodingPolicy-enum" />QDomNode.EncodingPolicy</h3><p>This enum specifies how <a href="qdomnode.html#save">QDomNode.save</a>() determines what encoding
to use when serializing.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QDomNode.EncodingFromDocument</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The encoding is fetched from the
document.</td>
</tr>
<tr>
<td class="topAlign"><tt>QDomNode.EncodingFromTextStream</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">The encoding is fetched from the <a href="qtextstream.html">QTextStream</a>.</td>
</tr>
</table>
<p>See also the overload of the <a href="qdomnode.html#save">save</a>() function that takes an
EncodingPolicy.</p>
<p>This enum was introduced or modified in Qt 4.3.</p>


<h3 class="fn"><a name="NodeType-enum" />QDomNode.NodeType</h3><p>This enum defines the type of the node:</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QDomNode.ElementNode</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QDomNode.AttributeNode</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QDomNode.TextNode</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QDomNode.CDATASectionNode</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QDomNode.EntityReferenceNode</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QDomNode.EntityNode</tt></td>
<td class="topAlign"><tt>6</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign">
<tt>QDomNode.ProcessingInstructionNode</tt></td>
<td class="topAlign"><tt>7</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QDomNode.CommentNode</tt></td>
<td class="topAlign"><tt>8</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QDomNode.DocumentNode</tt></td>
<td class="topAlign"><tt>9</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QDomNode.DocumentTypeNode</tt></td>
<td class="topAlign"><tt>10</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QDomNode.DocumentFragmentNode</tt></td>
<td class="topAlign"><tt>11</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QDomNode.NotationNode</tt></td>
<td class="topAlign"><tt>12</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QDomNode.BaseNode</tt></td>
<td class="topAlign"><tt>21</tt></td>
<td class="topAlign">A <a href="qdomnode.html">QDomNode</a> object,
i.e. not a <a href="qdomnode.html">QDomNode</a> subclass.</td>
</tr>
<tr>
<td class="topAlign"><tt>QDomNode.CharacterDataNode</tt></td>
<td class="topAlign"><tt>22</tt></td>
<td class="topAlign">&#160;</td>
</tr>
</table>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QDomNode" />QDomNode.__init__ (<i>self</i>)</h3><p>Constructs a <a href="qdomnode.html#isNull">null</a> node.</p>


<h3 class="fn"><a name="QDomNode-2" />QDomNode.__init__ (<i>self</i>, <a href="qdomnode.html">QDomNode</a>)</h3><p>Constructs a copy of <i>n</i>.</p>
<p>The data of the copy is shared (shallow copy): modifying one
node will also change the other. If you want to make a deep copy,
use <a href="qdomnode.html#cloneNode">cloneNode</a>().</p>


<h3 class="fn"><a name="appendChild" /><a href="qdomnode.html">QDomNode</a> QDomNode.appendChild (<i>self</i>, <a href="qdomnode.html">QDomNode</a>&#160;<i>newChild</i>)</h3><p>Appends <i>newChild</i> as the node's last child.</p>
<p>If <i>newChild</i> is the child of another node, it is
reparented to this node. If <i>newChild</i> is a child of this
node, then its position in the list of children is changed.</p>
<p>If <i>newChild</i> is a <a href="qdomdocumentfragment.html">QDomDocumentFragment</a>, then the
children of the fragment are removed from the fragment and
appended.</p>
<p>If <i>newChild</i> is a <a href="qdomelement.html">QDomElement</a> and this node is a <a href="qdomdocument.html">QDomDocument</a> that already has an element
node as a child, <i>newChild</i> is not added as a child and a null
node is returned.</p>
<p>Returns a new reference to <i>newChild</i> on success or a
<a href="qdomnode.html#isNull">null node</a> on failure.</p>
<p>Calling this function on a null node(created, for example, with
the default constructor) does nothing and returns a <a href="qdomnode.html#isNull">null node</a>.</p>
<p>The DOM specification disallow inserting attribute nodes, but
for historical reasons, QDom accepts them anyway.</p>
<p><b>See also</b> <a href="qdomnode.html#insertBefore">insertBefore</a>(), <a href="qdomnode.html#insertAfter">insertAfter</a>(), <a href="qdomnode.html#replaceChild">replaceChild</a>(), and <a href="qdomnode.html#removeChild">removeChild</a>().</p>


<h3 class="fn"><a name="attributes" /><a href="qdomnamednodemap.html">QDomNamedNodeMap</a> QDomNode.attributes (<i>self</i>)</h3><p>Returns a named node map of all attributes. Attributes are only
provided for <a href="qdomelement.html">QDomElement</a>s.</p>
<p>Changing the attributes in the map will also change the
attributes of this <a href="qdomnode.html">QDomNode</a>.</p>


<h3 class="fn"><a name="childNodes" /><a href="qdomnodelist.html">QDomNodeList</a> QDomNode.childNodes (<i>self</i>)</h3><p>Returns a list of all direct child nodes.</p>
<p>Most often you will call this function on a <a href="qdomelement.html">QDomElement</a> object.</p>
<p>For example, if the XML document looks like this:</p>
<pre class="cpp">
 <span class="operator">&lt;</span>body<span class="operator">&gt;</span>
 <span class="operator">&lt;</span>h1<span class="operator">&gt;</span>Heading<span class="operator">&lt;</span><span class="operator">/</span>h1<span class="operator">&gt;</span>
 <span class="operator">&lt;</span>p<span class="operator">&gt;</span>Hello <span class="operator">&lt;</span>b<span class="operator">&gt;</span>you<span class="operator">&lt;</span><span class="operator">/</span>b<span class="operator">&gt;</span><span class="operator">&lt;</span><span class="operator">/</span>p<span class="operator">&gt;</span>
 <span class="operator">&lt;</span><span class="operator">/</span>body<span class="operator">&gt;</span>
</pre>
<p>Then the list of child nodes for the "body"-element will contain
the node created by the &amp;lt;h1&amp;gt; tag and the node created
by the &amp;lt;p&amp;gt; tag.</p>
<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>
<p><b>See also</b> <a href="qdomnode.html#firstChild">firstChild</a>() and <a href="qdomnode.html#lastChild">lastChild</a>().</p>


<h3 class="fn"><a name="clear" />QDomNode.clear (<i>self</i>)</h3><p>Converts the node into a null node; if it was not a null node
before, its type and contents are deleted.</p>
<p><b>See also</b> <a href="qdomnode.html#isNull">isNull</a>().</p>


<h3 class="fn"><a name="cloneNode" /><a href="qdomnode.html">QDomNode</a> QDomNode.cloneNode (<i>self</i>, bool&#160;<i>deep</i>&#160;=&#160;True)</h3><p>Creates a deep (not shallow) copy of the <a href="qdomnode.html">QDomNode</a>.</p>
<p>If <i>deep</i> is true, then the cloning is done recursively
which means that all the node's children are deep copied too. If
<i>deep</i> is false only the node itself is copied and the copy
will have no child nodes.</p>


<h3 class="fn"><a name="columnNumber" />int QDomNode.columnNumber (<i>self</i>)</h3><p>For nodes created by <a href="qdomdocument.html#setContent">QDomDocument.setContent</a>(), this
function returns the column number in the XML document where the
node was parsed. Otherwise, -1 is returned.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also</b> <a href="qdomnode.html#lineNumber">lineNumber</a>() and <a href="qdomdocument.html#setContent">QDomDocument.setContent</a>().</p>


<h3 class="fn"><a name="firstChild" /><a href="qdomnode.html">QDomNode</a> QDomNode.firstChild (<i>self</i>)</h3><p>Returns the first child of the node. If there is no child node,
a <a href="qdomnode.html#isNull">null node</a> is returned.
Changing the returned node will also change the node in the
document tree.</p>
<p><b>See also</b> <a href="qdomnode.html#lastChild">lastChild</a>() and <a href="qdomnode.html#childNodes">childNodes</a>().</p>


<h3 class="fn"><a name="firstChildElement" /><a href="qdomelement.html">QDomElement</a> QDomNode.firstChildElement (<i>self</i>, QString&#160;<i>tagName</i>&#160;=&#160;'')</h3><p>Returns the first child element with tag name <i>tagName</i> if
tagName is non-empty; otherwise returns the first child element.
Returns a null element if no such child exists.</p>
<p><b>See also</b> <a href="qdomnode.html#lastChildElement">lastChildElement</a>(), <a href="qdomnode.html#previousSiblingElement">previousSiblingElement</a>(),
and <a href="qdomnode.html#nextSiblingElement">nextSiblingElement</a>().</p>


<h3 class="fn"><a name="hasAttributes" />bool QDomNode.hasAttributes (<i>self</i>)</h3><p>Returns true if the node has attributes; otherwise returns
false.</p>
<p><b>See also</b> <a href="qdomnode.html#attributes">attributes</a>().</p>


<h3 class="fn"><a name="hasChildNodes" />bool QDomNode.hasChildNodes (<i>self</i>)</h3><p>Returns true if the node has one or more children; otherwise
returns false.</p>


<h3 class="fn"><a name="insertAfter" /><a href="qdomnode.html">QDomNode</a> QDomNode.insertAfter (<i>self</i>, <a href="qdomnode.html">QDomNode</a>&#160;<i>newChild</i>, <a href="qdomnode.html">QDomNode</a>&#160;<i>refChild</i>)</h3><p>Inserts the node <i>newChild</i> after the child node
<i>refChild</i>. <i>refChild</i> must be a direct child of this
node. If <i>refChild</i> is <a href="qdomnode.html#isNull">null</a>
then <i>newChild</i> is appended as this node's last child.</p>
<p>If <i>newChild</i> is the child of another node, it is
reparented to this node. If <i>newChild</i> is a child of this
node, then its position in the list of children is changed.</p>
<p>If <i>newChild</i> is a <a href="qdomdocumentfragment.html">QDomDocumentFragment</a>, then the
children of the fragment are removed from the fragment and inserted
after <i>refChild</i>.</p>
<p>Returns a new reference to <i>newChild</i> on success or a
<a href="qdomnode.html#isNull">null node</a> on failure.</p>
<p>The DOM specification disallow inserting attribute nodes, but
due to historical reasons QDom accept them nevertheless.</p>
<p><b>See also</b> <a href="qdomnode.html#insertBefore">insertBefore</a>(), <a href="qdomnode.html#replaceChild">replaceChild</a>(), <a href="qdomnode.html#removeChild">removeChild</a>(), and <a href="qdomnode.html#appendChild">appendChild</a>().</p>


<h3 class="fn"><a name="insertBefore" /><a href="qdomnode.html">QDomNode</a> QDomNode.insertBefore (<i>self</i>, <a href="qdomnode.html">QDomNode</a>&#160;<i>newChild</i>, <a href="qdomnode.html">QDomNode</a>&#160;<i>refChild</i>)</h3><p>Inserts the node <i>newChild</i> before the child node
<i>refChild</i>. <i>refChild</i> must be a direct child of this
node. If <i>refChild</i> is <a href="qdomnode.html#isNull">null</a>
then <i>newChild</i> is inserted as the node's first child.</p>
<p>If <i>newChild</i> is the child of another node, it is
reparented to this node. If <i>newChild</i> is a child of this
node, then its position in the list of children is changed.</p>
<p>If <i>newChild</i> is a <a href="qdomdocumentfragment.html">QDomDocumentFragment</a>, then the
children of the fragment are removed from the fragment and inserted
before <i>refChild</i>.</p>
<p>Returns a new reference to <i>newChild</i> on success or a
<a href="qdomnode.html#isNull">null node</a> on failure.</p>
<p>The DOM specification disallow inserting attribute nodes, but
due to historical reasons QDom accept them nevertheless.</p>
<p><b>See also</b> <a href="qdomnode.html#insertAfter">insertAfter</a>(), <a href="qdomnode.html#replaceChild">replaceChild</a>(), <a href="qdomnode.html#removeChild">removeChild</a>(), and <a href="qdomnode.html#appendChild">appendChild</a>().</p>


<h3 class="fn"><a name="isAttr" />bool QDomNode.isAttr (<i>self</i>)</h3><p>Returns true if the node is an attribute; otherwise returns
false.</p>
<p>If this function returns true, it does not imply that this
object is a QDomAttribute; you can get the QDomAttribute with
toAttribute().</p>
<p><b>See also</b> <a href="qdomnode.html#toAttr">toAttr</a>().</p>


<h3 class="fn"><a name="isCDATASection" />bool QDomNode.isCDATASection (<i>self</i>)</h3><p>Returns true if the node is a CDATA section; otherwise returns
false.</p>
<p>If this function returns true, it does not imply that this
object is a <a href="qdomcdatasection.html">QDomCDATASection</a>;
you can get the <a href="qdomcdatasection.html">QDomCDATASection</a> with <a href="qdomnode.html#toCDATASection">toCDATASection</a>().</p>
<p><b>See also</b> <a href="qdomnode.html#toCDATASection">toCDATASection</a>().</p>


<h3 class="fn"><a name="isCharacterData" />bool QDomNode.isCharacterData (<i>self</i>)</h3><p>Returns true if the node is a character data node; otherwise
returns false.</p>
<p>If this function returns true, it does not imply that this
object is a <a href="qdomcharacterdata.html">QDomCharacterData</a>;
you can get the <a href="qdomcharacterdata.html">QDomCharacterData</a> with <a href="qdomnode.html#toCharacterData">toCharacterData</a>().</p>
<p><b>See also</b> <a href="qdomnode.html#toCharacterData">toCharacterData</a>().</p>


<h3 class="fn"><a name="isComment" />bool QDomNode.isComment (<i>self</i>)</h3><p>Returns true if the node is a comment; otherwise returns
false.</p>
<p>If this function returns true, it does not imply that this
object is a <a href="qdomcomment.html">QDomComment</a>; you can get
the <a href="qdomcomment.html">QDomComment</a> with <a href="qdomnode.html#toComment">toComment</a>().</p>
<p><b>See also</b> <a href="qdomnode.html#toComment">toComment</a>().</p>


<h3 class="fn"><a name="isDocument" />bool QDomNode.isDocument (<i>self</i>)</h3><p>Returns true if the node is a document; otherwise returns
false.</p>
<p>If this function returns true, it does not imply that this
object is a <a href="qdomdocument.html">QDomDocument</a>; you can
get the <a href="qdomdocument.html">QDomDocument</a> with <a href="qdomnode.html#toDocument">toDocument</a>().</p>
<p><b>See also</b> <a href="qdomnode.html#toDocument">toDocument</a>().</p>


<h3 class="fn"><a name="isDocumentFragment" />bool QDomNode.isDocumentFragment (<i>self</i>)</h3><p>Returns true if the node is a document fragment; otherwise
returns false.</p>
<p>If this function returns true, it does not imply that this
object is a <a href="qdomdocumentfragment.html">QDomDocumentFragment</a>; you can get
the <a href="qdomdocumentfragment.html">QDomDocumentFragment</a>
with <a href="qdomnode.html#toDocumentFragment">toDocumentFragment</a>().</p>
<p><b>See also</b> <a href="qdomnode.html#toDocumentFragment">toDocumentFragment</a>().</p>


<h3 class="fn"><a name="isDocumentType" />bool QDomNode.isDocumentType (<i>self</i>)</h3><p>Returns true if the node is a document type; otherwise returns
false.</p>
<p>If this function returns true, it does not imply that this
object is a <a href="qdomdocumenttype.html">QDomDocumentType</a>;
you can get the <a href="qdomdocumenttype.html">QDomDocumentType</a> with <a href="qdomnode.html#toDocumentType">toDocumentType</a>().</p>
<p><b>See also</b> <a href="qdomnode.html#toDocumentType">toDocumentType</a>().</p>


<h3 class="fn"><a name="isElement" />bool QDomNode.isElement (<i>self</i>)</h3><p>Returns true if the node is an element; otherwise returns
false.</p>
<p>If this function returns true, it does not imply that this
object is a <a href="qdomelement.html">QDomElement</a>; you can get
the <a href="qdomelement.html">QDomElement</a> with <a href="qdomnode.html#toElement">toElement</a>().</p>
<p><b>See also</b> <a href="qdomnode.html#toElement">toElement</a>().</p>


<h3 class="fn"><a name="isEntity" />bool QDomNode.isEntity (<i>self</i>)</h3><p>Returns true if the node is an entity; otherwise returns
false.</p>
<p>If this function returns true, it does not imply that this
object is a <a href="qdomentity.html">QDomEntity</a>; you can get
the <a href="qdomentity.html">QDomEntity</a> with <a href="qdomnode.html#toEntity">toEntity</a>().</p>
<p><b>See also</b> <a href="qdomnode.html#toEntity">toEntity</a>().</p>


<h3 class="fn"><a name="isEntityReference" />bool QDomNode.isEntityReference (<i>self</i>)</h3><p>Returns true if the node is an entity reference; otherwise
returns false.</p>
<p>If this function returns true, it does not imply that this
object is a <a href="qdomentityreference.html">QDomEntityReference</a>; you can get the
<a href="qdomentityreference.html">QDomEntityReference</a> with
<a href="qdomnode.html#toEntityReference">toEntityReference</a>().</p>
<p><b>See also</b> <a href="qdomnode.html#toEntityReference">toEntityReference</a>().</p>


<h3 class="fn"><a name="isNotation" />bool QDomNode.isNotation (<i>self</i>)</h3><p>Returns true if the node is a notation; otherwise returns
false.</p>
<p>If this function returns true, it does not imply that this
object is a <a href="qdomnotation.html">QDomNotation</a>; you can
get the <a href="qdomnotation.html">QDomNotation</a> with <a href="qdomnode.html#toNotation">toNotation</a>().</p>
<p><b>See also</b> <a href="qdomnode.html#toNotation">toNotation</a>().</p>


<h3 class="fn"><a name="isNull" />bool QDomNode.isNull (<i>self</i>)</h3><p>Returns true if this node is null (i.e. if it has no type or
contents); otherwise returns false.</p>


<h3 class="fn"><a name="isProcessingInstruction" />bool QDomNode.isProcessingInstruction (<i>self</i>)</h3><p>Returns true if the node is a processing instruction; otherwise
returns false.</p>
<p>If this function returns true, it does not imply that this
object is a <a href="qdomprocessinginstruction.html">QDomProcessingInstruction</a>; you
can get the QProcessingInstruction with <a href="qdomnode.html#toProcessingInstruction">toProcessingInstruction</a>().</p>
<p><b>See also</b> <a href="qdomnode.html#toProcessingInstruction">toProcessingInstruction</a>().</p>


<h3 class="fn"><a name="isSupported" />bool QDomNode.isSupported (<i>self</i>, QString&#160;<i>feature</i>, QString&#160;<i>version</i>)</h3><p>Returns true if the DOM implementation implements the feature
<i>feature</i> and this feature is supported by this node in the
version <i>version</i>; otherwise returns false.</p>
<p><b>See also</b> <a href="qdomimplementation.html#hasFeature">QDomImplementation.hasFeature</a>().</p>


<h3 class="fn"><a name="isText" />bool QDomNode.isText (<i>self</i>)</h3><p>Returns true if the node is a text node; otherwise returns
false.</p>
<p>If this function returns true, it does not imply that this
object is a <a href="qdomtext.html">QDomText</a>; you can get the
<a href="qdomtext.html">QDomText</a> with <a href="qdomnode.html#toText">toText</a>().</p>
<p><b>See also</b> <a href="qdomnode.html#toText">toText</a>().</p>


<h3 class="fn"><a name="lastChild" /><a href="qdomnode.html">QDomNode</a> QDomNode.lastChild (<i>self</i>)</h3><p>Returns the last child of the node. If there is no child node, a
<a href="qdomnode.html#isNull">null node</a> is returned. Changing
the returned node will also change the node in the document
tree.</p>
<p><b>See also</b> <a href="qdomnode.html#firstChild">firstChild</a>() and <a href="qdomnode.html#childNodes">childNodes</a>().</p>


<h3 class="fn"><a name="lastChildElement" /><a href="qdomelement.html">QDomElement</a> QDomNode.lastChildElement (<i>self</i>, QString&#160;<i>tagName</i>&#160;=&#160;'')</h3><p>Returns the last child element with tag name <i>tagName</i> if
tagName is non-empty; otherwise returns the last child element.
Returns a null element if no such child exists.</p>
<p><b>See also</b> <a href="qdomnode.html#firstChildElement">firstChildElement</a>(), <a href="qdomnode.html#previousSiblingElement">previousSiblingElement</a>(),
and <a href="qdomnode.html#nextSiblingElement">nextSiblingElement</a>().</p>


<h3 class="fn"><a name="lineNumber" />int QDomNode.lineNumber (<i>self</i>)</h3><p>For nodes created by <a href="qdomdocument.html#setContent">QDomDocument.setContent</a>(), this
function returns the line number in the XML document where the node
was parsed. Otherwise, -1 is returned.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also</b> <a href="qdomnode.html#columnNumber">columnNumber</a>() and <a href="qdomdocument.html#setContent">QDomDocument.setContent</a>().</p>


<h3 class="fn"><a name="localName" />QString QDomNode.localName (<i>self</i>)</h3><p>If the node uses namespaces, this function returns the local
name of the node; otherwise it returns an empty string.</p>
<p>Only nodes of type <a href="qdomnode.html#NodeType-enum">ElementNode</a> or <a href="qdomnode.html#NodeType-enum">AttributeNode</a> can have
namespaces. A namespace must have been specified at creation time;
it is not possible to add a namespace afterwards.</p>
<p><a href="qdomdocument.html#createAttributeNS">QDomDocument.createAttributeNS</a>()</p>
<p><b>See also</b> <a href="qdomnode.html#prefix">prefix</a>(),
<a href="qdomnode.html#namespaceURIx">namespaceURI</a>(), and
<a href="qdomdocument.html#createElementNS">QDomDocument.createElementNS</a>().</p>


<h3 class="fn"><a name="namedItem" /><a href="qdomnode.html">QDomNode</a> QDomNode.namedItem (<i>self</i>, QString&#160;<i>name</i>)</h3><p>Returns the first direct child node for which <a href="qdomnode.html#nodeName">nodeName</a>() equals <i>name</i>.</p>
<p>If no such direct child exists, a <a href="qdomnode.html#isNull">null node</a> is returned.</p>
<p><b>See also</b> <a href="qdomnode.html#nodeName">nodeName</a>().</p>


<h3 class="fn"><a name="namespaceURI" />QString QDomNode.namespaceURI (<i>self</i>)</h3><h3 class="fn"><a name="nextSibling" /><a href="qdomnode.html">QDomNode</a> QDomNode.nextSibling (<i>self</i>)</h3><p>Returns the next sibling in the document tree. Changing the
returned node will also change the node in the document tree.</p>
<p>If you have XML like this:</p>
<pre class="cpp">
 <span class="operator">&lt;</span>h1<span class="operator">&gt;</span>Heading<span class="operator">&lt;</span><span class="operator">/</span>h1<span class="operator">&gt;</span>
 <span class="operator">&lt;</span>p<span class="operator">&gt;</span>The text<span class="operator">.</span><span class="operator">.</span><span class="operator">.</span><span class="operator">&lt;</span><span class="operator">/</span>p<span class="operator">&gt;</span>
 <span class="operator">&lt;</span>h2<span class="operator">&gt;</span>Next heading<span class="operator">&lt;</span><span class="operator">/</span>h2<span class="operator">&gt;</span>
</pre>
<p>and this <a href="qdomnode.html">QDomNode</a> represents the
&lt;p&gt; tag, nextSibling() will return the node representing the
&lt;h2&gt; tag.</p>
<p><b>See also</b> <a href="qdomnode.html#previousSibling">previousSibling</a>().</p>


<h3 class="fn"><a name="nextSiblingElement" /><a href="qdomelement.html">QDomElement</a> QDomNode.nextSiblingElement (<i>self</i>, QString&#160;<i>tagName</i>&#160;=&#160;'')</h3><p>Returns the next sibling element with tag name <i>tagName</i> if
<i>tagName</i> is non-empty; otherwise returns any next sibling
element. Returns a null element if no such sibling exists.</p>
<p><b>See also</b> <a href="qdomnode.html#firstChildElement">firstChildElement</a>(), <a href="qdomnode.html#previousSiblingElement">previousSiblingElement</a>(),
and <a href="qdomnode.html#lastChildElement">lastChildElement</a>().</p>


<h3 class="fn"><a name="nodeName" />QString QDomNode.nodeName (<i>self</i>)</h3><p>Returns the name of the node.</p>
<p>The meaning of the name depends on the subclass:</p>
<table class="generic">
<thead>
<tr class="qt-style">
<th>Name</th>
<th>Meaning</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td><a href="qdomattr.html">QDomAttr</a></td>
<td>The name of the attribute</td>
</tr>
<tr class="even" valign="top">
<td><a href="qdomcdatasection.html">QDomCDATASection</a></td>
<td>The string "#cdata-section"</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qdomcomment.html">QDomComment</a></td>
<td>The string "#comment"</td>
</tr>
<tr class="even" valign="top">
<td><a href="qdomdocument.html">QDomDocument</a></td>
<td>The string "#document"</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qdomdocumentfragment.html">QDomDocumentFragment</a></td>
<td>The string "#document-fragment"</td>
</tr>
<tr class="even" valign="top">
<td><a href="qdomdocumenttype.html">QDomDocumentType</a></td>
<td>The name of the document type</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qdomelement.html">QDomElement</a></td>
<td>The tag name</td>
</tr>
<tr class="even" valign="top">
<td><a href="qdomentity.html">QDomEntity</a></td>
<td>The name of the entity</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qdomentityreference.html">QDomEntityReference</a></td>
<td>The name of the referenced entity</td>
</tr>
<tr class="even" valign="top">
<td><a href="qdomnotation.html">QDomNotation</a></td>
<td>The name of the notation</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qdomprocessinginstruction.html">QDomProcessingInstruction</a></td>
<td>The target of the processing instruction</td>
</tr>
<tr class="even" valign="top">
<td><a href="qdomtext.html">QDomText</a></td>
<td>The string "#text"</td>
</tr>
</table>
<p><b>Note:</b> This function does not take the presence of
namespaces into account when processing the names of element and
attribute nodes. As a result, the returned name can contain any
namespace prefix that may be present. To obtain the node name of an
element or attribute, use <a href="qdomnode.html#localName">localName</a>(); to obtain the namespace
prefix, use <a href="qdomnode.html#namespaceURIx">namespaceURI</a>().</p>
<p><b>See also</b> <a href="qdomnode.html#nodeValue">nodeValue</a>().</p>


<h3 class="fn"><a name="nodeType" /><a href="qdomnode.html#NodeType-enum">NodeType</a> QDomNode.nodeType (<i>self</i>)</h3><p>Returns the type of the node.</p>
<p><b>See also</b> <a href="qdomnode.html#toAttr">toAttr</a>(),
<a href="qdomnode.html#toCDATASection">toCDATASection</a>(),
<a href="qdomnode.html#toDocumentFragment">toDocumentFragment</a>(),
<a href="qdomnode.html#toDocument">toDocument</a>(), <a href="qdomnode.html#toDocumentType">toDocumentType</a>(), <a href="qdomnode.html#toElement">toElement</a>(), <a href="qdomnode.html#toEntityReference">toEntityReference</a>(), <a href="qdomnode.html#toText">toText</a>(), <a href="qdomnode.html#toEntity">toEntity</a>(), <a href="qdomnode.html#toNotation">toNotation</a>(), <a href="qdomnode.html#toProcessingInstruction">toProcessingInstruction</a>(),
<a href="qdomnode.html#toCharacterData">toCharacterData</a>(), and
<a href="qdomnode.html#toComment">toComment</a>().</p>


<h3 class="fn"><a name="nodeValue" />QString QDomNode.nodeValue (<i>self</i>)</h3><p>Returns the value of the node.</p>
<p>The meaning of the value depends on the subclass:</p>
<table class="generic">
<thead>
<tr class="qt-style">
<th>Name</th>
<th>Meaning</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td><a href="qdomattr.html">QDomAttr</a></td>
<td>The attribute value</td>
</tr>
<tr class="even" valign="top">
<td><a href="qdomcdatasection.html">QDomCDATASection</a></td>
<td>The content of the CDATA section</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qdomcomment.html">QDomComment</a></td>
<td>The comment</td>
</tr>
<tr class="even" valign="top">
<td><a href="qdomprocessinginstruction.html">QDomProcessingInstruction</a></td>
<td>The data of the processing instruction</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qdomtext.html">QDomText</a></td>
<td>The text</td>
</tr>
</table>
<p>All the other subclasses do not have a node value and will
return an empty string.</p>
<p><b>See also</b> <a href="qdomnode.html#setNodeValue">setNodeValue</a>() and <a href="qdomnode.html#nodeName">nodeName</a>().</p>


<h3 class="fn"><a name="normalize" />QDomNode.normalize (<i>self</i>)</h3><p>Calling normalize() on an element converts all its children into
a standard form. This means that adjacent <a href="qdomtext.html">QDomText</a> objects will be merged into a single
text object (<a href="qdomcdatasection.html">QDomCDATASection</a>
nodes are not merged).</p>


<h3 class="fn"><a name="ownerDocument" /><a href="qdomdocument.html">QDomDocument</a> QDomNode.ownerDocument (<i>self</i>)</h3><p>Returns the document to which this node belongs.</p>


<h3 class="fn"><a name="parentNode" /><a href="qdomnode.html">QDomNode</a> QDomNode.parentNode (<i>self</i>)</h3><p>Returns the parent node. If this node has no parent, a null node
is returned (i.e. a node for which <a href="qdomnode.html#isNull">isNull</a>() returns true).</p>


<h3 class="fn"><a name="prefix" />QString QDomNode.prefix (<i>self</i>)</h3><p>Returns the namespace prefix of the node or an empty string if
the node has no namespace prefix.</p>
<p>Only nodes of type <a href="qdomnode.html#NodeType-enum">ElementNode</a> or <a href="qdomnode.html#NodeType-enum">AttributeNode</a> can have
namespaces. A namespace prefix must be specified at creation time.
If a node was created with a namespace prefix, you can change it
later with <a href="qdomnode.html#setPrefix">setPrefix</a>().</p>
<p>If you create an element or attribute with <a href="qdomdocument.html#createElement">QDomDocument.createElement</a>()
or <a href="qdomdocument.html#createAttribute">QDomDocument.createAttribute</a>(),
the prefix will be an empty string. If you use <a href="qdomdocument.html#createElementNS">QDomDocument.createElementNS</a>()
or <a href="qdomdocument.html#createAttributeNS">QDomDocument.createAttributeNS</a>()
instead, the prefix will not be an empty string; but it might be an
empty string if the name does not have a prefix.</p>
<p><a href="qdomdocument.html#createElementNS">QDomDocument.createElementNS</a>()
<a href="qdomdocument.html#createAttributeNS">QDomDocument.createAttributeNS</a>()</p>
<p><b>See also</b> <a href="qdomnode.html#setPrefix">setPrefix</a>(), <a href="qdomnode.html#localName">localName</a>(), and <a href="qdomnode.html#namespaceURIx">namespaceURI</a>().</p>


<h3 class="fn"><a name="previousSibling" /><a href="qdomnode.html">QDomNode</a> QDomNode.previousSibling (<i>self</i>)</h3><p>Returns the previous sibling in the document tree. Changing the
returned node will also change the node in the document tree.</p>
<p>For example, if you have XML like this:</p>
<pre class="cpp">
 <span class="operator">&lt;</span>h1<span class="operator">&gt;</span>Heading<span class="operator">&lt;</span><span class="operator">/</span>h1<span class="operator">&gt;</span>
 <span class="operator">&lt;</span>p<span class="operator">&gt;</span>The text<span class="operator">.</span><span class="operator">.</span><span class="operator">.</span><span class="operator">&lt;</span><span class="operator">/</span>p<span class="operator">&gt;</span>
 <span class="operator">&lt;</span>h2<span class="operator">&gt;</span>Next heading<span class="operator">&lt;</span><span class="operator">/</span>h2<span class="operator">&gt;</span>
</pre>
<p>and this <a href="qdomnode.html">QDomNode</a> represents the
&amp;lt;p&amp;gt; tag, previousSibling() will return the node
representing the &amp;lt;h1&amp;gt; tag.</p>
<p><b>See also</b> <a href="qdomnode.html#nextSibling">nextSibling</a>().</p>


<h3 class="fn"><a name="previousSiblingElement" /><a href="qdomelement.html">QDomElement</a> QDomNode.previousSiblingElement (<i>self</i>, QString&#160;<i>tagName</i>&#160;=&#160;'')</h3><p>Returns the previous sibilng element with tag name
<i>tagName</i> if <i>tagName</i> is non-empty; otherwise returns
any previous sibling element. Returns a null element if no such
sibling exists.</p>
<p><b>See also</b> <a href="qdomnode.html#firstChildElement">firstChildElement</a>(), <a href="qdomnode.html#nextSiblingElement">nextSiblingElement</a>(), and
<a href="qdomnode.html#lastChildElement">lastChildElement</a>().</p>


<h3 class="fn"><a name="removeChild" /><a href="qdomnode.html">QDomNode</a> QDomNode.removeChild (<i>self</i>, <a href="qdomnode.html">QDomNode</a>&#160;<i>oldChild</i>)</h3><p>Removes <i>oldChild</i> from the list of children.
<i>oldChild</i> must be a direct child of this node.</p>
<p>Returns a new reference to <i>oldChild</i> on success or a
<a href="qdomnode.html#isNull">null node</a> on failure.</p>
<p><b>See also</b> <a href="qdomnode.html#insertBefore">insertBefore</a>(), <a href="qdomnode.html#insertAfter">insertAfter</a>(), <a href="qdomnode.html#replaceChild">replaceChild</a>(), and <a href="qdomnode.html#appendChild">appendChild</a>().</p>


<h3 class="fn"><a name="replaceChild" /><a href="qdomnode.html">QDomNode</a> QDomNode.replaceChild (<i>self</i>, <a href="qdomnode.html">QDomNode</a>&#160;<i>newChild</i>, <a href="qdomnode.html">QDomNode</a>&#160;<i>oldChild</i>)</h3><p>Replaces <i>oldChild</i> with <i>newChild</i>. <i>oldChild</i>
must be a direct child of this node.</p>
<p>If <i>newChild</i> is the child of another node, it is
reparented to this node. If <i>newChild</i> is a child of this
node, then its position in the list of children is changed.</p>
<p>If <i>newChild</i> is a <a href="qdomdocumentfragment.html">QDomDocumentFragment</a>, then
<i>oldChild</i> is replaced by all of the children of the
fragment.</p>
<p>Returns a new reference to <i>oldChild</i> on success or a
<a href="qdomnode.html#isNull">null node</a> an failure.</p>
<p><b>See also</b> <a href="qdomnode.html#insertBefore">insertBefore</a>(), <a href="qdomnode.html#insertAfter">insertAfter</a>(), <a href="qdomnode.html#removeChild">removeChild</a>(), and <a href="qdomnode.html#appendChild">appendChild</a>().</p>


<h3 class="fn"><a name="save" />QDomNode.save (<i>self</i>, <a href="qtextstream.html">QTextStream</a>, int)</h3><p>Writes the XML representation of the node and all its children
to the stream <i>str</i>. This function uses <i>indent</i> as the
amount of space to indent the node.</p>
<p>If this node is a document node, the encoding of text stream
<i>str</i>'s encoding is set by treating a processing instruction
by name "xml" as an XML declaration, if such a one exists, and
otherwise defaults to UTF-8. XML declarations are not processing
instructions, but this behavior exists for historical reasons. If
this node is not a document node, the text stream's encoding is
used.</p>
<p>If the document contains invalid XML characters or characters
that cannot be encoded in the given encoding, the result and
behavior is undefined.</p>


<h3 class="fn"><a name="save-2" />QDomNode.save (<i>self</i>, <a href="qtextstream.html">QTextStream</a>, int, <a href="qdomnode.html#EncodingPolicy-enum">EncodingPolicy</a>)</h3><p>If <i>encodingPolicy</i> is <a href="qdomnode.html#EncodingPolicy-enum">QDomNode.EncodingFromDocument</a>,
this function behaves as save(<a href="qtextstream.html">QTextStream</a> &amp;str, int indent).</p>
<p>If <i>encodingPolicy</i> is <a href="qdomnode.html#EncodingPolicy-enum">EncodingFromTextStream</a> and
this node is a document node, this function behaves as
save(<a href="qtextstream.html">QTextStream</a> &amp;str, int
indent) with the exception that the encoding specified in the text
stream <i>str</i> is used.</p>
<p>If the document contains invalid XML characters or characters
that cannot be encoded in the given encoding, the result and
behavior is undefined.</p>
<p>This function was introduced in Qt 4.2.</p>


<h3 class="fn"><a name="setNodeValue" />QDomNode.setNodeValue (<i>self</i>, QString)</h3><p>Sets the node's value to <i>v</i>.</p>
<p><b>See also</b> <a href="qdomnode.html#nodeValue">nodeValue</a>().</p>


<h3 class="fn"><a name="setPrefix" />QDomNode.setPrefix (<i>self</i>, QString&#160;<i>pre</i>)</h3><p>If the node has a namespace prefix, this function changes the
namespace prefix of the node to <i>pre</i>. Otherwise this function
does nothing.</p>
<p>Only nodes of type <a href="qdomnode.html#NodeType-enum">ElementNode</a> or <a href="qdomnode.html#NodeType-enum">AttributeNode</a> can have
namespaces. A namespace prefix must have be specified at creation
time; it is not possible to add a namespace prefix afterwards.</p>
<p><a href="qdomdocument.html#createElementNS">QDomDocument.createElementNS</a>()
<a href="qdomdocument.html#createAttributeNS">QDomDocument.createAttributeNS</a>()</p>
<p><b>See also</b> <a href="qdomnode.html#prefix">prefix</a>(),
<a href="qdomnode.html#localName">localName</a>(), and <a href="qdomnode.html#namespaceURIx">namespaceURI</a>().</p>


<h3 class="fn"><a name="toAttr" /><a href="qdomattr.html">QDomAttr</a> QDomNode.toAttr (<i>self</i>)</h3><p>Converts a <a href="qdomnode.html">QDomNode</a> into a <a href="qdomattr.html">QDomAttr</a>. If the node is not an attribute, the
returned object will be <a href="qdomnode.html#isNull">null</a>.</p>
<p><b>See also</b> <a href="qdomnode.html#isAttr">isAttr</a>().</p>


<h3 class="fn"><a name="toCDATASection" /><a href="qdomcdatasection.html">QDomCDATASection</a> QDomNode.toCDATASection (<i>self</i>)</h3><p>Converts a <a href="qdomnode.html">QDomNode</a> into a <a href="qdomcdatasection.html">QDomCDATASection</a>. If the node is not a
CDATA section, the returned object will be <a href="qdomnode.html#isNull">null</a>.</p>
<p><b>See also</b> <a href="qdomnode.html#isCDATASection">isCDATASection</a>().</p>


<h3 class="fn"><a name="toCharacterData" /><a href="qdomcharacterdata.html">QDomCharacterData</a> QDomNode.toCharacterData (<i>self</i>)</h3><p>Converts a <a href="qdomnode.html">QDomNode</a> into a <a href="qdomcharacterdata.html">QDomCharacterData</a>. If the node is not
a character data node the returned object will be <a href="qdomnode.html#isNull">null</a>.</p>
<p><b>See also</b> <a href="qdomnode.html#isCharacterData">isCharacterData</a>().</p>


<h3 class="fn"><a name="toComment" /><a href="qdomcomment.html">QDomComment</a> QDomNode.toComment (<i>self</i>)</h3><p>Converts a <a href="qdomnode.html">QDomNode</a> into a <a href="qdomcomment.html">QDomComment</a>. If the node is not a comment
the returned object will be <a href="qdomnode.html#isNull">null</a>.</p>
<p><b>See also</b> <a href="qdomnode.html#isComment">isComment</a>().</p>


<h3 class="fn"><a name="toDocument" /><a href="qdomdocument.html">QDomDocument</a> QDomNode.toDocument (<i>self</i>)</h3><p>Converts a <a href="qdomnode.html">QDomNode</a> into a <a href="qdomdocument.html">QDomDocument</a>. If the node is not a document
the returned object will be <a href="qdomnode.html#isNull">null</a>.</p>
<p><b>See also</b> <a href="qdomnode.html#isDocument">isDocument</a>().</p>


<h3 class="fn"><a name="toDocumentFragment" /><a href="qdomdocumentfragment.html">QDomDocumentFragment</a> QDomNode.toDocumentFragment (<i>self</i>)</h3><p>Converts a <a href="qdomnode.html">QDomNode</a> into a <a href="qdomdocumentfragment.html">QDomDocumentFragment</a>. If the node
is not a document fragment the returned object will be <a href="qdomnode.html#isNull">null</a>.</p>
<p><b>See also</b> <a href="qdomnode.html#isDocumentFragment">isDocumentFragment</a>().</p>


<h3 class="fn"><a name="toDocumentType" /><a href="qdomdocumenttype.html">QDomDocumentType</a> QDomNode.toDocumentType (<i>self</i>)</h3><p>Converts a <a href="qdomnode.html">QDomNode</a> into a <a href="qdomdocumenttype.html">QDomDocumentType</a>. If the node is not a
document type the returned object will be <a href="qdomnode.html#isNull">null</a>.</p>
<p><b>See also</b> <a href="qdomnode.html#isDocumentType">isDocumentType</a>().</p>


<h3 class="fn"><a name="toElement" /><a href="qdomelement.html">QDomElement</a> QDomNode.toElement (<i>self</i>)</h3><p>Converts a <a href="qdomnode.html">QDomNode</a> into a <a href="qdomelement.html">QDomElement</a>. If the node is not an element
the returned object will be <a href="qdomnode.html#isNull">null</a>.</p>
<p><b>See also</b> <a href="qdomnode.html#isElement">isElement</a>().</p>


<h3 class="fn"><a name="toEntity" /><a href="qdomentity.html">QDomEntity</a> QDomNode.toEntity (<i>self</i>)</h3><p>Converts a <a href="qdomnode.html">QDomNode</a> into a <a href="qdomentity.html">QDomEntity</a>. If the node is not an entity the
returned object will be <a href="qdomnode.html#isNull">null</a>.</p>
<p><b>See also</b> <a href="qdomnode.html#isEntity">isEntity</a>().</p>


<h3 class="fn"><a name="toEntityReference" /><a href="qdomentityreference.html">QDomEntityReference</a> QDomNode.toEntityReference (<i>self</i>)</h3><p>Converts a <a href="qdomnode.html">QDomNode</a> into a <a href="qdomentityreference.html">QDomEntityReference</a>. If the node is
not an entity reference, the returned object will be <a href="qdomnode.html#isNull">null</a>.</p>
<p><b>See also</b> <a href="qdomnode.html#isEntityReference">isEntityReference</a>().</p>


<h3 class="fn"><a name="toNotation" /><a href="qdomnotation.html">QDomNotation</a> QDomNode.toNotation (<i>self</i>)</h3><p>Converts a <a href="qdomnode.html">QDomNode</a> into a <a href="qdomnotation.html">QDomNotation</a>. If the node is not a notation
the returned object will be <a href="qdomnode.html#isNull">null</a>.</p>
<p><b>See also</b> <a href="qdomnode.html#isNotation">isNotation</a>().</p>


<h3 class="fn"><a name="toProcessingInstruction" /><a href="qdomprocessinginstruction.html">QDomProcessingInstruction</a> QDomNode.toProcessingInstruction (<i>self</i>)</h3><p>Converts a <a href="qdomnode.html">QDomNode</a> into a <a href="qdomprocessinginstruction.html">QDomProcessingInstruction</a>. If
the node is not a processing instruction the returned object will
be <a href="qdomnode.html#isNull">null</a>.</p>
<p><b>See also</b> <a href="qdomnode.html#isProcessingInstruction">isProcessingInstruction</a>().</p>


<h3 class="fn"><a name="toText" /><a href="qdomtext.html">QDomText</a> QDomNode.toText (<i>self</i>)</h3><p>Converts a <a href="qdomnode.html">QDomNode</a> into a <a href="qdomtext.html">QDomText</a>. If the node is not a text, the
returned object will be <a href="qdomnode.html#isNull">null</a>.</p>
<p><b>See also</b> <a href="qdomnode.html#isText">isText</a>().</p>


<h3 class="fn"><a name="__eq__" />bool QDomNode.__eq__ (<i>self</i>, <a href="qdomnode.html">QDomNode</a>)</h3><h3 class="fn"><a name="__ne__" />bool QDomNode.__ne__ (<i>self</i>, <a href="qdomnode.html">QDomNode</a>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.12.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qt.io">The Qt Company</a> 2015</td><td align="right" width="25%">Qt&#160;4.8.7</td></tr></table></div></address></body></html>