~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qdomdocument.html

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!DOCTYPE html
3
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
 
<!-- /fasttmp/mkdist-qt-4.5.2-1245473805/qt-x11-opensource-src-4.5.2/src/xml/dom/qdom.cpp -->
 
5
<!-- qdom.cpp -->
6
6
<head>
7
 
  <title>Qt 4.5: QDomDocument Class Reference</title>
 
7
  <title>Qt 4.6: QDomDocument Class Reference</title>
8
8
  <link href="classic.css" rel="stylesheet" type="text/css" />
9
9
</head>
10
10
<body>
 
11
<a name="//apple_ref/cpp/cl//QDomDocument" />
11
12
<table border="0" cellpadding="0" cellspacing="0" width="100%">
12
13
<tr>
13
 
<td align="left" valign="top" width="32"><a href="http://qtsoftware.com/products/qt"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
14
 
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="namespaces.html"><font color="#004faf">All&nbsp;Namespaces</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
15
 
<td align="right" valign="top" width="230"></td></tr></table><h1 class="title">QDomDocument Class Reference<br /><span class="small-subtitle">[<a href="qtxml.html">QtXml</a> module]</span>
 
14
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
 
15
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td><td class="searchBar" align="right" valign="center"><form action="http://www.google.com/cse" id="cse-search-box"><div><input type="hidden" name="cx" value="000136343326384750312:dhbxnqlakyu" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" size="31" /><input type="submit" name="sa" value="Search" /></div></form></td>
 
16
</tr></table><h1 class="title">QDomDocument Class Reference<br /><span class="small-subtitle">[<a href="qtxml.html">QtXml</a> module]</span>
16
17
</h1>
17
18
<p>The QDomDocument class represents an XML document. <a href="#details">More...</a></p>
18
 
<pre> #include &lt;QDomDocument&gt;</pre><p>Inherits <a href="qdomnode.html">QDomNode</a>.</p>
19
 
<p><b>Note:</b> All the functions in this class are <a href="threads.html#reentrant">reentrant</a>, except <a href="qdomdocument.html#setContent">setContent</a>().</p>
 
19
<pre> #include &lt;QDomDocument&gt;</pre><p><b>This class is not part of the Qt GUI Framework Edition.</b></p>
 
20
<p>Inherits <a href="qdomnode.html">QDomNode</a>.</p>
 
21
<p><b>Note:</b> All functions in this class are <a href="threads-reentrancy.html#reentrant">reentrant</a>, except for <a href="qdomdocument.html#setContent">setContent</a>(), which is nonreentrant.</p>
20
22
<ul>
21
23
<li><a href="qdomdocument-members.html">List of all members, including inherited members</a></li>
22
24
</ul>
 
25
<hr />
23
26
<a name="public-functions"></a>
24
 
<h3>Public Functions</h3>
25
 
<ul>
26
 
<li><div class="fn"></div><b><a href="qdomdocument.html#QDomDocument">QDomDocument</a></b> ()</li>
27
 
<li><div class="fn"></div><b><a href="qdomdocument.html#QDomDocument-2">QDomDocument</a></b> ( const QString &amp; <i>name</i> )</li>
28
 
<li><div class="fn"></div><b><a href="qdomdocument.html#QDomDocument-3">QDomDocument</a></b> ( const QDomDocumentType &amp; <i>doctype</i> )</li>
29
 
<li><div class="fn"></div><b><a href="qdomdocument.html#QDomDocument-4">QDomDocument</a></b> ( const QDomDocument &amp; <i>x</i> )</li>
30
 
<li><div class="fn"></div><b><a href="qdomdocument.html#dtor.QDomDocument">~QDomDocument</a></b> ()</li>
31
 
<li><div class="fn"></div>QDomAttr <b><a href="qdomdocument.html#createAttribute">createAttribute</a></b> ( const QString &amp; <i>name</i> )</li>
32
 
<li><div class="fn"></div>QDomAttr <b><a href="qdomdocument.html#createAttributeNS">createAttributeNS</a></b> ( const QString &amp; <i>nsURI</i>, const QString &amp; <i>qName</i> )</li>
33
 
<li><div class="fn"></div>QDomCDATASection <b><a href="qdomdocument.html#createCDATASection">createCDATASection</a></b> ( const QString &amp; <i>value</i> )</li>
34
 
<li><div class="fn"></div>QDomComment <b><a href="qdomdocument.html#createComment">createComment</a></b> ( const QString &amp; <i>value</i> )</li>
35
 
<li><div class="fn"></div>QDomDocumentFragment <b><a href="qdomdocument.html#createDocumentFragment">createDocumentFragment</a></b> ()</li>
36
 
<li><div class="fn"></div>QDomElement <b><a href="qdomdocument.html#createElement">createElement</a></b> ( const QString &amp; <i>tagName</i> )</li>
37
 
<li><div class="fn"></div>QDomElement <b><a href="qdomdocument.html#createElementNS">createElementNS</a></b> ( const QString &amp; <i>nsURI</i>, const QString &amp; <i>qName</i> )</li>
38
 
<li><div class="fn"></div>QDomEntityReference <b><a href="qdomdocument.html#createEntityReference">createEntityReference</a></b> ( const QString &amp; <i>name</i> )</li>
39
 
<li><div class="fn"></div>QDomProcessingInstruction <b><a href="qdomdocument.html#createProcessingInstruction">createProcessingInstruction</a></b> ( const QString &amp; <i>target</i>, const QString &amp; <i>data</i> )</li>
40
 
<li><div class="fn"></div>QDomText <b><a href="qdomdocument.html#createTextNode">createTextNode</a></b> ( const QString &amp; <i>value</i> )</li>
41
 
<li><div class="fn"></div>QDomDocumentType <b><a href="qdomdocument.html#doctype">doctype</a></b> () const</li>
42
 
<li><div class="fn"></div>QDomElement <b><a href="qdomdocument.html#documentElement">documentElement</a></b> () const</li>
43
 
<li><div class="fn"></div>QDomElement <b><a href="qdomdocument.html#elementById">elementById</a></b> ( const QString &amp; <i>elementId</i> )</li>
44
 
<li><div class="fn"></div>QDomNodeList <b><a href="qdomdocument.html#elementsByTagName">elementsByTagName</a></b> ( const QString &amp; <i>tagname</i> ) const</li>
45
 
<li><div class="fn"></div>QDomNodeList <b><a href="qdomdocument.html#elementsByTagNameNS">elementsByTagNameNS</a></b> ( const QString &amp; <i>nsURI</i>, const QString &amp; <i>localName</i> )</li>
46
 
<li><div class="fn"></div>QDomImplementation <b><a href="qdomdocument.html#implementation">implementation</a></b> () const</li>
47
 
<li><div class="fn"></div>QDomNode <b><a href="qdomdocument.html#importNode">importNode</a></b> ( const QDomNode &amp; <i>importedNode</i>, bool <i>deep</i> )</li>
48
 
<li><div class="fn"></div>QDomNode::NodeType <b><a href="qdomdocument.html#nodeType">nodeType</a></b> () const</li>
49
 
<li><div class="fn"></div>bool <b><a href="qdomdocument.html#setContent">setContent</a></b> ( const QByteArray &amp; <i>data</i>, bool <i>namespaceProcessing</i>, QString * <i>errorMsg</i> = 0, int * <i>errorLine</i> = 0, int * <i>errorColumn</i> = 0 )</li>
50
 
<li><div class="fn"></div>bool <b><a href="qdomdocument.html#setContent-2">setContent</a></b> ( const QString &amp; <i>text</i>, bool <i>namespaceProcessing</i>, QString * <i>errorMsg</i> = 0, int * <i>errorLine</i> = 0, int * <i>errorColumn</i> = 0 )</li>
51
 
<li><div class="fn"></div>bool <b><a href="qdomdocument.html#setContent-3">setContent</a></b> ( QIODevice * <i>dev</i>, bool <i>namespaceProcessing</i>, QString * <i>errorMsg</i> = 0, int * <i>errorLine</i> = 0, int * <i>errorColumn</i> = 0 )</li>
52
 
<li><div class="fn"></div>bool <b><a href="qdomdocument.html#setContent-4">setContent</a></b> ( QXmlInputSource * <i>source</i>, bool <i>namespaceProcessing</i>, QString * <i>errorMsg</i> = 0, int * <i>errorLine</i> = 0, int * <i>errorColumn</i> = 0 )</li>
53
 
<li><div class="fn"></div>bool <b><a href="qdomdocument.html#setContent-5">setContent</a></b> ( const QString &amp; <i>text</i>, QString * <i>errorMsg</i> = 0, int * <i>errorLine</i> = 0, int * <i>errorColumn</i> = 0 )</li>
54
 
<li><div class="fn"></div>bool <b><a href="qdomdocument.html#setContent-6">setContent</a></b> ( const QByteArray &amp; <i>buffer</i>, QString * <i>errorMsg</i> = 0, int * <i>errorLine</i> = 0, int * <i>errorColumn</i> = 0 )</li>
55
 
<li><div class="fn"></div>bool <b><a href="qdomdocument.html#setContent-7">setContent</a></b> ( QIODevice * <i>dev</i>, QString * <i>errorMsg</i> = 0, int * <i>errorLine</i> = 0, int * <i>errorColumn</i> = 0 )</li>
56
 
<li><div class="fn"></div>bool <b><a href="qdomdocument.html#setContent-8">setContent</a></b> ( QXmlInputSource * <i>source</i>, QXmlReader * <i>reader</i>, QString * <i>errorMsg</i> = 0, int * <i>errorLine</i> = 0, int * <i>errorColumn</i> = 0 )</li>
57
 
<li><div class="fn"></div>QByteArray <b><a href="qdomdocument.html#toByteArray">toByteArray</a></b> ( int <i>indent</i> = 1 ) const</li>
58
 
<li><div class="fn"></div>QString <b><a href="qdomdocument.html#toString">toString</a></b> ( int <i>indent</i> = 1 ) const</li>
59
 
<li><div class="fn"></div>QDomDocument &amp; <b><a href="qdomdocument.html#operator-eq">operator=</a></b> ( const QDomDocument &amp; <i>x</i> )</li>
60
 
</ul>
61
 
<ul>
62
 
<li><div class="fn"></div>66 public functions inherited from <a href="qdomnode.html#public-functions">QDomNode</a></li>
 
27
<h2>Public Functions</h2>
 
28
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
29
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#QDomDocument">QDomDocument</a></b> ()</td></tr>
 
30
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#QDomDocument-2">QDomDocument</a></b> ( const QString &amp; <i>name</i> )</td></tr>
 
31
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#QDomDocument-3">QDomDocument</a></b> ( const QDomDocumentType &amp; <i>doctype</i> )</td></tr>
 
32
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#QDomDocument-4">QDomDocument</a></b> ( const QDomDocument &amp; <i>x</i> )</td></tr>
 
33
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#dtor.QDomDocument">~QDomDocument</a></b> ()</td></tr>
 
34
<tr><td class="memItemLeft" align="right" valign="top">QDomAttr </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#createAttribute">createAttribute</a></b> ( const QString &amp; <i>name</i> )</td></tr>
 
35
<tr><td class="memItemLeft" align="right" valign="top">QDomAttr </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#createAttributeNS">createAttributeNS</a></b> ( const QString &amp; <i>nsURI</i>, const QString &amp; <i>qName</i> )</td></tr>
 
36
<tr><td class="memItemLeft" align="right" valign="top">QDomCDATASection </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#createCDATASection">createCDATASection</a></b> ( const QString &amp; <i>value</i> )</td></tr>
 
37
<tr><td class="memItemLeft" align="right" valign="top">QDomComment </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#createComment">createComment</a></b> ( const QString &amp; <i>value</i> )</td></tr>
 
38
<tr><td class="memItemLeft" align="right" valign="top">QDomDocumentFragment </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#createDocumentFragment">createDocumentFragment</a></b> ()</td></tr>
 
39
<tr><td class="memItemLeft" align="right" valign="top">QDomElement </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#createElement">createElement</a></b> ( const QString &amp; <i>tagName</i> )</td></tr>
 
40
<tr><td class="memItemLeft" align="right" valign="top">QDomElement </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#createElementNS">createElementNS</a></b> ( const QString &amp; <i>nsURI</i>, const QString &amp; <i>qName</i> )</td></tr>
 
41
<tr><td class="memItemLeft" align="right" valign="top">QDomEntityReference </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#createEntityReference">createEntityReference</a></b> ( const QString &amp; <i>name</i> )</td></tr>
 
42
<tr><td class="memItemLeft" align="right" valign="top">QDomProcessingInstruction </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#createProcessingInstruction">createProcessingInstruction</a></b> ( const QString &amp; <i>target</i>, const QString &amp; <i>data</i> )</td></tr>
 
43
<tr><td class="memItemLeft" align="right" valign="top">QDomText </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#createTextNode">createTextNode</a></b> ( const QString &amp; <i>value</i> )</td></tr>
 
44
<tr><td class="memItemLeft" align="right" valign="top">QDomDocumentType </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#doctype">doctype</a></b> () const</td></tr>
 
45
<tr><td class="memItemLeft" align="right" valign="top">QDomElement </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#documentElement">documentElement</a></b> () const</td></tr>
 
46
<tr><td class="memItemLeft" align="right" valign="top">QDomElement </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#elementById">elementById</a></b> ( const QString &amp; <i>elementId</i> )</td></tr>
 
47
<tr><td class="memItemLeft" align="right" valign="top">QDomNodeList </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#elementsByTagName">elementsByTagName</a></b> ( const QString &amp; <i>tagname</i> ) const</td></tr>
 
48
<tr><td class="memItemLeft" align="right" valign="top">QDomNodeList </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#elementsByTagNameNS">elementsByTagNameNS</a></b> ( const QString &amp; <i>nsURI</i>, const QString &amp; <i>localName</i> )</td></tr>
 
49
<tr><td class="memItemLeft" align="right" valign="top">QDomImplementation </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#implementation">implementation</a></b> () const</td></tr>
 
50
<tr><td class="memItemLeft" align="right" valign="top">QDomNode </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#importNode">importNode</a></b> ( const QDomNode &amp; <i>importedNode</i>, bool <i>deep</i> )</td></tr>
 
51
<tr><td class="memItemLeft" align="right" valign="top">QDomNode::NodeType </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#nodeType">nodeType</a></b> () const</td></tr>
 
52
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#setContent">setContent</a></b> ( const QByteArray &amp; <i>data</i>, bool <i>namespaceProcessing</i>, QString * <i>errorMsg</i> = 0, int * <i>errorLine</i> = 0, int * <i>errorColumn</i> = 0 )</td></tr>
 
53
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#setContent-2">setContent</a></b> ( const QString &amp; <i>text</i>, bool <i>namespaceProcessing</i>, QString * <i>errorMsg</i> = 0, int * <i>errorLine</i> = 0, int * <i>errorColumn</i> = 0 )</td></tr>
 
54
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#setContent-3">setContent</a></b> ( QIODevice * <i>dev</i>, bool <i>namespaceProcessing</i>, QString * <i>errorMsg</i> = 0, int * <i>errorLine</i> = 0, int * <i>errorColumn</i> = 0 )</td></tr>
 
55
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#setContent-4">setContent</a></b> ( QXmlInputSource * <i>source</i>, bool <i>namespaceProcessing</i>, QString * <i>errorMsg</i> = 0, int * <i>errorLine</i> = 0, int * <i>errorColumn</i> = 0 )</td></tr>
 
56
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#setContent-5">setContent</a></b> ( const QString &amp; <i>text</i>, QString * <i>errorMsg</i> = 0, int * <i>errorLine</i> = 0, int * <i>errorColumn</i> = 0 )</td></tr>
 
57
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#setContent-6">setContent</a></b> ( const QByteArray &amp; <i>buffer</i>, QString * <i>errorMsg</i> = 0, int * <i>errorLine</i> = 0, int * <i>errorColumn</i> = 0 )</td></tr>
 
58
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#setContent-7">setContent</a></b> ( QIODevice * <i>dev</i>, QString * <i>errorMsg</i> = 0, int * <i>errorLine</i> = 0, int * <i>errorColumn</i> = 0 )</td></tr>
 
59
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#setContent-8">setContent</a></b> ( QXmlInputSource * <i>source</i>, QXmlReader * <i>reader</i>, QString * <i>errorMsg</i> = 0, int * <i>errorLine</i> = 0, int * <i>errorColumn</i> = 0 )</td></tr>
 
60
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#toByteArray">toByteArray</a></b> ( int <i>indent</i> = 1 ) const</td></tr>
 
61
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#toString">toString</a></b> ( int <i>indent</i> = 1 ) const</td></tr>
 
62
<tr><td class="memItemLeft" align="right" valign="top">QDomDocument &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qdomdocument.html#operator-eq">operator=</a></b> ( const QDomDocument &amp; <i>x</i> )</td></tr>
 
63
</table>
 
64
<ul>
 
65
<li><div bar="2" class="fn"></div>66 public functions inherited from <a href="qdomnode.html#public-functions">QDomNode</a></li>
63
66
</ul>
64
67
<a name="details"></a>
65
68
<hr />
118
121
<p>See also <a href="xml-dombookmarks.html">DOM Bookmarks Example</a> and <a href="itemviews-simpledommodel.html">Simple DOM Model Example</a>.</p>
119
122
<hr />
120
123
<h2>Member Function Documentation</h2>
 
124
<a name="//apple_ref/cpp/instm/QDomDocument/QDomDocument" />
121
125
<h3 class="fn"><a name="QDomDocument"></a>QDomDocument::QDomDocument ()</h3>
122
126
<p>Constructs an empty document.</p>
123
127
<h3 class="fn"><a name="QDomDocument-2"></a>QDomDocument::QDomDocument ( const <a href="qstring.html">QString</a> &amp; <i>name</i> )</h3>
128
132
<h3 class="fn"><a name="QDomDocument-4"></a>QDomDocument::QDomDocument ( const QDomDocument &amp; <i>x</i> )</h3>
129
133
<p>Constructs a copy of <i>x</i>.</p>
130
134
<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>
 
135
<a name="//apple_ref/cpp/instm/QDomDocument/~QDomDocument" />
131
136
<h3 class="fn"><a name="dtor.QDomDocument"></a>QDomDocument::~QDomDocument ()</h3>
132
137
<p>Destroys the object and frees its resources.</p>
 
138
<a name="//apple_ref/cpp/instm/QDomDocument/createAttribute" />
133
139
<h3 class="fn"><a name="createAttribute"></a><a href="qdomattr.html">QDomAttr</a> QDomDocument::createAttribute ( const <a href="qstring.html">QString</a> &amp; <i>name</i> )</h3>
134
140
<p>Creates a new attribute called <i>name</i> that can be inserted into an element, e.g&#x2e; using <a href="qdomelement.html#setAttributeNode">QDomElement::setAttributeNode</a>().</p>
135
141
<p>If <i>name</i> is not a valid XML name, the behavior of this function is governed by <a href="qdomimplementation.html#InvalidDataPolicy-enum">QDomImplementation::InvalidDataPolicy</a>.</p>
136
142
<p>See also <a href="qdomdocument.html#createAttributeNS">createAttributeNS</a>().</p>
 
143
<a name="//apple_ref/cpp/instm/QDomDocument/createAttributeNS" />
137
144
<h3 class="fn"><a name="createAttributeNS"></a><a href="qdomattr.html">QDomAttr</a> QDomDocument::createAttributeNS ( const <a href="qstring.html">QString</a> &amp; <i>nsURI</i>, const <a href="qstring.html">QString</a> &amp; <i>qName</i> )</h3>
138
145
<p>Creates a new attribute with namespace support that can be inserted into an element. The name of the attribute is <i>qName</i> and the namespace URI is <i>nsURI</i>. This function also sets <a href="qdomnode.html#prefix">QDomNode::prefix</a>() and <a href="qdomnode.html#localName">QDomNode::localName</a>() to appropriate values (depending on <i>qName</i>).</p>
139
146
<p>If <i>qName</i> is not a valid XML name, the behavior of this function is governed by <a href="qdomimplementation.html#InvalidDataPolicy-enum">QDomImplementation::InvalidDataPolicy</a>.</p>
140
147
<p>See also <a href="qdomdocument.html#createAttribute">createAttribute</a>().</p>
 
148
<a name="//apple_ref/cpp/instm/QDomDocument/createCDATASection" />
141
149
<h3 class="fn"><a name="createCDATASection"></a><a href="qdomcdatasection.html">QDomCDATASection</a> QDomDocument::createCDATASection ( const <a href="qstring.html">QString</a> &amp; <i>value</i> )</h3>
142
150
<p>Creates a new CDATA section for the string <i>value</i> that can be inserted into the document, e.g&#x2e; using <a href="qdomnode.html#appendChild">QDomNode::appendChild</a>().</p>
143
151
<p>If <i>value</i> contains characters which cannot be stored in a CDATA section, the behavior of this function is governed by <a href="qdomimplementation.html#InvalidDataPolicy-enum">QDomImplementation::InvalidDataPolicy</a>.</p>
144
152
<p>See also <a href="qdomnode.html#appendChild">QDomNode::appendChild</a>(), <a href="qdomnode.html#insertBefore">QDomNode::insertBefore</a>(), and <a href="qdomnode.html#insertAfter">QDomNode::insertAfter</a>().</p>
 
153
<a name="//apple_ref/cpp/instm/QDomDocument/createComment" />
145
154
<h3 class="fn"><a name="createComment"></a><a href="qdomcomment.html">QDomComment</a> QDomDocument::createComment ( const <a href="qstring.html">QString</a> &amp; <i>value</i> )</h3>
146
155
<p>Creates a new comment for the string <i>value</i> that can be inserted into the document, e.g&#x2e; using <a href="qdomnode.html#appendChild">QDomNode::appendChild</a>().</p>
147
156
<p>If <i>value</i> contains characters which cannot be stored in an XML comment, the behavior of this function is governed by <a href="qdomimplementation.html#InvalidDataPolicy-enum">QDomImplementation::InvalidDataPolicy</a>.</p>
148
157
<p>See also <a href="qdomnode.html#appendChild">QDomNode::appendChild</a>(), <a href="qdomnode.html#insertBefore">QDomNode::insertBefore</a>(), and <a href="qdomnode.html#insertAfter">QDomNode::insertAfter</a>().</p>
 
158
<a name="//apple_ref/cpp/instm/QDomDocument/createDocumentFragment" />
149
159
<h3 class="fn"><a name="createDocumentFragment"></a><a href="qdomdocumentfragment.html">QDomDocumentFragment</a> QDomDocument::createDocumentFragment ()</h3>
150
160
<p>Creates a new document fragment, that can be used to hold parts of the document, e.g&#x2e; when doing complex manipulations of the document tree.</p>
 
161
<a name="//apple_ref/cpp/instm/QDomDocument/createElement" />
151
162
<h3 class="fn"><a name="createElement"></a><a href="qdomelement.html">QDomElement</a> QDomDocument::createElement ( const <a href="qstring.html">QString</a> &amp; <i>tagName</i> )</h3>
152
163
<p>Creates a new element called <i>tagName</i> that can be inserted into the DOM tree, e.g&#x2e; using <a href="qdomnode.html#appendChild">QDomNode::appendChild</a>().</p>
153
164
<p>If <i>tagName</i> is not a valid XML name, the behavior of this function is governed by <a href="qdomimplementation.html#InvalidDataPolicy-enum">QDomImplementation::InvalidDataPolicy</a>.</p>
154
165
<p><a href="qdomnode.html#insertAfter">QDomNode::insertAfter</a>()</p>
155
166
<p>See also <a href="qdomdocument.html#createElementNS">createElementNS</a>(), <a href="qdomnode.html#appendChild">QDomNode::appendChild</a>(), and <a href="qdomnode.html#insertBefore">QDomNode::insertBefore</a>().</p>
 
167
<a name="//apple_ref/cpp/instm/QDomDocument/createElementNS" />
156
168
<h3 class="fn"><a name="createElementNS"></a><a href="qdomelement.html">QDomElement</a> QDomDocument::createElementNS ( const <a href="qstring.html">QString</a> &amp; <i>nsURI</i>, const <a href="qstring.html">QString</a> &amp; <i>qName</i> )</h3>
157
169
<p>Creates a new element with namespace support that can be inserted into the DOM tree. The name of the element is <i>qName</i> and the namespace URI is <i>nsURI</i>. This function also sets <a href="qdomnode.html#prefix">QDomNode::prefix</a>() and <a href="qdomnode.html#localName">QDomNode::localName</a>() to appropriate values (depending on <i>qName</i>).</p>
158
170
<p>If <i>qName</i> is an empty string, returns a null element regardless of whether the invalid data policy is set.</p>
159
171
<p>See also <a href="qdomdocument.html#createElement">createElement</a>().</p>
 
172
<a name="//apple_ref/cpp/instm/QDomDocument/createEntityReference" />
160
173
<h3 class="fn"><a name="createEntityReference"></a><a href="qdomentityreference.html">QDomEntityReference</a> QDomDocument::createEntityReference ( const <a href="qstring.html">QString</a> &amp; <i>name</i> )</h3>
161
174
<p>Creates a new entity reference called <i>name</i> that can be inserted into the document, e.g&#x2e; using <a href="qdomnode.html#appendChild">QDomNode::appendChild</a>().</p>
162
175
<p>If <i>name</i> is not a valid XML name, the behavior of this function is governed by <a href="qdomimplementation.html#InvalidDataPolicy-enum">QDomImplementation::InvalidDataPolicy</a>.</p>
163
176
<p>See also <a href="qdomnode.html#appendChild">QDomNode::appendChild</a>(), <a href="qdomnode.html#insertBefore">QDomNode::insertBefore</a>(), and <a href="qdomnode.html#insertAfter">QDomNode::insertAfter</a>().</p>
 
177
<a name="//apple_ref/cpp/instm/QDomDocument/createProcessingInstruction" />
164
178
<h3 class="fn"><a name="createProcessingInstruction"></a><a href="qdomprocessinginstruction.html">QDomProcessingInstruction</a> QDomDocument::createProcessingInstruction ( const <a href="qstring.html">QString</a> &amp; <i>target</i>, const <a href="qstring.html">QString</a> &amp; <i>data</i> )</h3>
165
179
<p>Creates a new processing instruction that can be inserted into the document, e.g&#x2e; using <a href="qdomnode.html#appendChild">QDomNode::appendChild</a>(). This function sets the target for the processing instruction to <i>target</i> and the data to <i>data</i>.</p>
166
180
<p>If <i>target</i> is not a valid XML name, or data if contains characters which cannot appear in a processing instruction, the behavior of this function is governed by <a href="qdomimplementation.html#InvalidDataPolicy-enum">QDomImplementation::InvalidDataPolicy</a>.</p>
167
181
<p>See also <a href="qdomnode.html#appendChild">QDomNode::appendChild</a>(), <a href="qdomnode.html#insertBefore">QDomNode::insertBefore</a>(), and <a href="qdomnode.html#insertAfter">QDomNode::insertAfter</a>().</p>
 
182
<a name="//apple_ref/cpp/instm/QDomDocument/createTextNode" />
168
183
<h3 class="fn"><a name="createTextNode"></a><a href="qdomtext.html">QDomText</a> QDomDocument::createTextNode ( const <a href="qstring.html">QString</a> &amp; <i>value</i> )</h3>
169
184
<p>Creates a text node for the string <i>value</i> that can be inserted into the document tree, e.g&#x2e; using <a href="qdomnode.html#appendChild">QDomNode::appendChild</a>().</p>
170
185
<p>If <i>value</i> contains characters which cannot be stored as character data of an XML document (even in the form of character references), the behavior of this function is governed by <a href="qdomimplementation.html#InvalidDataPolicy-enum">QDomImplementation::InvalidDataPolicy</a>.</p>
171
186
<p>See also <a href="qdomnode.html#appendChild">QDomNode::appendChild</a>(), <a href="qdomnode.html#insertBefore">QDomNode::insertBefore</a>(), and <a href="qdomnode.html#insertAfter">QDomNode::insertAfter</a>().</p>
 
187
<a name="//apple_ref/cpp/instm/QDomDocument/doctype" />
172
188
<h3 class="fn"><a name="doctype"></a><a href="qdomdocumenttype.html">QDomDocumentType</a> QDomDocument::doctype () const</h3>
173
189
<p>Returns the document type of this document.</p>
 
190
<a name="//apple_ref/cpp/instm/QDomDocument/documentElement" />
174
191
<h3 class="fn"><a name="documentElement"></a><a href="qdomelement.html">QDomElement</a> QDomDocument::documentElement () const</h3>
175
192
<p>Returns the root element of the document.</p>
 
193
<a name="//apple_ref/cpp/instm/QDomDocument/elementById" />
176
194
<h3 class="fn"><a name="elementById"></a><a href="qdomelement.html">QDomElement</a> QDomDocument::elementById ( const <a href="qstring.html">QString</a> &amp; <i>elementId</i> )</h3>
177
195
<p>Returns the element whose ID is equal to <i>elementId</i>. If no element with the ID was found, this function returns a <a href="qdomnode.html#isNull">null element</a>.</p>
178
196
<p>Since the QDomClasses do not know which attributes are element IDs, this function returns always a <a href="qdomnode.html#isNull">null element</a>. This may change in a future version.</p>
 
197
<a name="//apple_ref/cpp/instm/QDomDocument/elementsByTagName" />
179
198
<h3 class="fn"><a name="elementsByTagName"></a><a href="qdomnodelist.html">QDomNodeList</a> QDomDocument::elementsByTagName ( const <a href="qstring.html">QString</a> &amp; <i>tagname</i> ) const</h3>
180
199
<p>Returns a <a href="qdomnodelist.html">QDomNodeList</a>, that contains all the elements in the document with the name <i>tagname</i>. The order of the node list is the order they are encountered in a preorder traversal of the element tree.</p>
181
200
<p>See also <a href="qdomdocument.html#elementsByTagNameNS">elementsByTagNameNS</a>() and <a href="qdomelement.html#elementsByTagName">QDomElement::elementsByTagName</a>().</p>
 
201
<a name="//apple_ref/cpp/instm/QDomDocument/elementsByTagNameNS" />
182
202
<h3 class="fn"><a name="elementsByTagNameNS"></a><a href="qdomnodelist.html">QDomNodeList</a> QDomDocument::elementsByTagNameNS ( const <a href="qstring.html">QString</a> &amp; <i>nsURI</i>, const <a href="qstring.html">QString</a> &amp; <i>localName</i> )</h3>
183
203
<p>Returns a <a href="qdomnodelist.html">QDomNodeList</a> that contains all the elements in the document with the local name <i>localName</i> and a namespace URI of <i>nsURI</i>. The order of the node list is the order they are encountered in a preorder traversal of the element tree.</p>
184
204
<p>See also <a href="qdomdocument.html#elementsByTagName">elementsByTagName</a>() and <a href="qdomelement.html#elementsByTagNameNS">QDomElement::elementsByTagNameNS</a>().</p>
 
205
<a name="//apple_ref/cpp/instm/QDomDocument/implementation" />
185
206
<h3 class="fn"><a name="implementation"></a><a href="qdomimplementation.html">QDomImplementation</a> QDomDocument::implementation () const</h3>
186
207
<p>Returns a <a href="qdomimplementation.html">QDomImplementation</a> object.</p>
 
208
<a name="//apple_ref/cpp/instm/QDomDocument/importNode" />
187
209
<h3 class="fn"><a name="importNode"></a><a href="qdomnode.html">QDomNode</a> QDomDocument::importNode ( const <a href="qdomnode.html">QDomNode</a> &amp; <i>importedNode</i>, bool <i>deep</i> )</h3>
188
210
<p>Imports the node <i>importedNode</i> from another document to this document. <i>importedNode</i> remains in the original document; this function creates a copy that can be used within this document.</p>
189
211
<p>This function returns the imported node that belongs to this document. The returned node has no parent. It is not possible to import <a href="qdomdocument.html">QDomDocument</a> and <a href="qdomdocumenttype.html">QDomDocumentType</a> nodes. In those cases this function returns a <a href="qdomnode.html#isNull">null node</a>.</p>
190
212
<p>If <i>deep</i> is true, this function imports not only the node <i>importedNode</i> but its whole subtree; if it is false, only the <i>importedNode</i> is imported. The argument <i>deep</i> has no effect on <a href="qdomattr.html">QDomAttr</a> and <a href="qdomentityreference.html">QDomEntityReference</a> nodes, since the descendants of <a href="qdomattr.html">QDomAttr</a> nodes are always imported and those of <a href="qdomentityreference.html">QDomEntityReference</a> nodes are never imported.</p>
191
213
<p>The behavior of this function is slightly different depending on the node types:</p>
192
 
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
 
214
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
193
215
<thead><tr valign="top" class="qt-style"><th>Node Type</th><th>Behavior</th></tr></thead>
194
216
<tr valign="top" class="odd"><td><a href="qdomattr.html">QDomAttr</a></td><td>The owner element is set to 0 and the specified flag is set to true in the generated attribute. The whole subtree of <i>importedNode</i> is always imported for attribute nodes: <i>deep</i> has no effect.</td></tr>
195
217
<tr valign="top" class="even"><td><a href="qdomdocument.html">QDomDocument</a></td><td>Document nodes cannot be imported.</td></tr>
206
228
</table></p>
207
229
<p><a href="qdomnode.html#insertAfter">QDomNode::insertAfter</a>() <a href="qdomnode.html#replaceChild">QDomNode::replaceChild</a>() <a href="qdomnode.html#removeChild">QDomNode::removeChild</a>() <a href="qdomnode.html#appendChild">QDomNode::appendChild</a>()</p>
208
230
<p>See also <a href="qdomelement.html#setAttribute">QDomElement::setAttribute</a>() and <a href="qdomnode.html#insertBefore">QDomNode::insertBefore</a>().</p>
 
231
<a name="//apple_ref/cpp/instm/QDomDocument/nodeType" />
209
232
<h3 class="fn"><a name="nodeType"></a><a href="qdomnode.html#NodeType-enum">QDomNode::NodeType</a> QDomDocument::nodeType () const</h3>
210
233
<p>Returns <tt>DocumentNode</tt>.</p>
 
234
<a name="//apple_ref/cpp/instm/QDomDocument/setContent" />
211
235
<h3 class="fn"><a name="setContent"></a>bool QDomDocument::setContent ( const <a href="qbytearray.html">QByteArray</a> &amp; <i>data</i>, bool <i>namespaceProcessing</i>, <a href="qstring.html">QString</a> * <i>errorMsg</i> = 0, int * <i>errorLine</i> = 0, int * <i>errorColumn</i> = 0 )</h3>
212
236
<p>This function parses the XML document from the byte array <i>data</i> and sets it as the content of the document. It tries to detect the encoding of the document as required by the XML specification.</p>
213
237
<p>If <i>namespaceProcessing</i> is true, the parser recognizes namespaces in the XML file and sets the prefix name, local name and namespace URI to appropriate values. If <i>namespaceProcessing</i> is false, the parser does no namespace processing when it reads the XML file.</p>
224
248
<li>Any unparsed entity reference is replaced with an empty string.</li>
225
249
</ul>
226
250
<p><a href="qdomnode.html#prefix">QDomNode::prefix</a>() <a href="qstring.html#isNull">QString::isNull</a>() <a href="qstring.html#isEmpty">QString::isEmpty</a>()</p>
227
 
<p><b>Warning:</b> This function is not <a href="threads.html#reentrant">reentrant</a>.</p>
 
251
<p><b>Warning:</b> This function is not <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
228
252
<p>See also <a href="qdomnode.html#namespaceURIx">QDomNode::namespaceURI</a>() and <a href="qdomnode.html#localName">QDomNode::localName</a>().</p>
229
253
<h3 class="fn"><a name="setContent-2"></a>bool QDomDocument::setContent ( const <a href="qstring.html">QString</a> &amp; <i>text</i>, bool <i>namespaceProcessing</i>, <a href="qstring.html">QString</a> * <i>errorMsg</i> = 0, int * <i>errorLine</i> = 0, int * <i>errorColumn</i> = 0 )</h3>
230
254
<p>This is an overloaded function.</p>
253
277
<p>This function reads the XML document from the <a href="qxmlinputsource.html">QXmlInputSource</a> <i>source</i> and parses it with the <a href="qxmlreader.html">QXmlReader</a> <i>reader</i>, returning true if the content was successfully parsed; otherwise returns false.</p>
254
278
<p>This function doesn't change the features of the <i>reader</i>. If you want to use certain features for parsing you can use this function to set up the reader appropriately.</p>
255
279
<p>See also <a href="qxmlsimplereader.html">QXmlSimpleReader</a>.</p>
 
280
<a name="//apple_ref/cpp/instm/QDomDocument/toByteArray" />
256
281
<h3 class="fn"><a name="toByteArray"></a><a href="qbytearray.html">QByteArray</a> QDomDocument::toByteArray ( int <i>indent</i> = 1 ) const</h3>
257
282
<p>Converts the parsed document back to its textual representation and returns a <a href="qbytearray.html">QByteArray</a> containing the data encoded as UTF-8.</p>
258
283
<p>This function uses <i>indent</i> as the amount of space to indent subelements.</p>
259
284
<p>See also <a href="qdomdocument.html#toString">toString</a>().</p>
 
285
<a name="//apple_ref/cpp/instm/QDomDocument/toString" />
260
286
<h3 class="fn"><a name="toString"></a><a href="qstring.html">QString</a> QDomDocument::toString ( int <i>indent</i> = 1 ) const</h3>
261
287
<p>Converts the parsed document back to its textual representation.</p>
262
288
<p>This function uses <i>indent</i> as the amount of space to indent subelements.</p>
263
289
<p>If <i>indent</i> is -1, no whitespace at all is added.</p>
 
290
<a name="//apple_ref/cpp/instm/QDomDocument/operator=" />
264
291
<h3 class="fn"><a name="operator-eq"></a>QDomDocument &amp; QDomDocument::operator= ( const QDomDocument &amp; <i>x</i> )</h3>
265
292
<p>Assigns <i>x</i> to this DOM document.</p>
266
293
<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>
267
294
<p /><address><hr /><div align="center">
268
295
<table width="100%" cellspacing="0" border="0"><tr class="address">
269
 
<td width="30%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
270
 
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
271
 
<td width="30%" align="right"><div align="right">Qt 4.5.2</div></td>
272
 
</tr></table></div></address></body>
 
296
<td width="40%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
 
297
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
298
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
 
299
<script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script><script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en"></script><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script></tr></table></div></address></body>
273
300
</html>