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

« back to all changes in this revision

Viewing changes to doc/html/qxmlsimplereader.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/sax/qxml.cpp -->
 
5
<!-- qxml.cpp -->
6
6
<head>
7
 
  <title>Qt 4.5: QXmlSimpleReader Class Reference</title>
 
7
  <title>Qt 4.6: QXmlSimpleReader 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//QXmlSimpleReader" />
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">QXmlSimpleReader 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">QXmlSimpleReader Class Reference<br /><span class="small-subtitle">[<a href="qtxml.html">QtXml</a> module]</span>
16
17
</h1>
17
18
<p>The QXmlSimpleReader class provides an implementation of a simple XML parser. <a href="#details">More...</a></p>
18
 
<pre> #include &lt;QXmlSimpleReader&gt;</pre><p>Inherits <a href="qxmlreader.html">QXmlReader</a>.</p>
19
 
<p><b>Warning:</b> This class is not <a href="threads.html#reentrant">reentrant</a>.</p>
 
19
<pre> #include &lt;QXmlSimpleReader&gt;</pre><p><b>This class is not part of the Qt GUI Framework Edition.</b></p>
 
20
<p>Inherits <a href="qxmlreader.html">QXmlReader</a>.</p>
 
21
<p><b>Warning:</b> This class is not <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
20
22
<ul>
21
23
<li><a href="qxmlsimplereader-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="qxmlsimplereader.html#QXmlSimpleReader">QXmlSimpleReader</a></b> ()</li>
27
 
<li><div class="fn"></div>virtual <b><a href="qxmlsimplereader.html#dtor.QXmlSimpleReader">~QXmlSimpleReader</a></b> ()</li>
28
 
<li><div class="fn"></div>virtual bool <b><a href="qxmlsimplereader.html#parse">parse</a></b> ( const QXmlInputSource * <i>input</i> )</li>
29
 
<li><div class="fn"></div>virtual bool <b><a href="qxmlsimplereader.html#parse-3">parse</a></b> ( const QXmlInputSource * <i>input</i>, bool <i>incremental</i> )</li>
30
 
<li><div class="fn"></div>virtual bool <b><a href="qxmlsimplereader.html#parseContinue">parseContinue</a></b> ()</li>
31
 
<li><div class="fn"></div>virtual void <b><a href="qxmlsimplereader.html#setFeature">setFeature</a></b> ( const QString &amp; <i>name</i>, bool <i>enable</i> )</li>
32
 
</ul>
33
 
<ul>
34
 
<li><div class="fn"></div>19 public functions inherited from <a href="qxmlreader.html#public-functions">QXmlReader</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="qxmlsimplereader.html#QXmlSimpleReader">QXmlSimpleReader</a></b> ()</td></tr>
 
30
<tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#dtor.QXmlSimpleReader">~QXmlSimpleReader</a></b> ()</td></tr>
 
31
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#parse-3">parse</a></b> ( const QXmlInputSource * <i>input</i>, bool <i>incremental</i> )</td></tr>
 
32
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#parseContinue">parseContinue</a></b> ()</td></tr>
 
33
</table>
 
34
<hr />
 
35
<a name="reimplemented-public-functions"></a>
 
36
<h2>Reimplemented Public Functions</h2>
 
37
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
38
<tr><td class="memItemLeft" align="right" valign="top">virtual QXmlDTDHandler * </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#DTDHandler">DTDHandler</a></b> () const</td></tr>
 
39
<tr><td class="memItemLeft" align="right" valign="top">virtual QXmlContentHandler * </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#contentHandler">contentHandler</a></b> () const</td></tr>
 
40
<tr><td class="memItemLeft" align="right" valign="top">virtual QXmlDeclHandler * </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#declHandler">declHandler</a></b> () const</td></tr>
 
41
<tr><td class="memItemLeft" align="right" valign="top">virtual QXmlEntityResolver * </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#entityResolver">entityResolver</a></b> () const</td></tr>
 
42
<tr><td class="memItemLeft" align="right" valign="top">virtual QXmlErrorHandler * </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#errorHandler">errorHandler</a></b> () const</td></tr>
 
43
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#feature">feature</a></b> ( const QString &amp; <i>name</i>, bool * <i>ok</i> = 0 ) const</td></tr>
 
44
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#hasFeature">hasFeature</a></b> ( const QString &amp; <i>name</i> ) const</td></tr>
 
45
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#hasProperty">hasProperty</a></b> ( const QString &amp; <i>name</i> ) const</td></tr>
 
46
<tr><td class="memItemLeft" align="right" valign="top">virtual QXmlLexicalHandler * </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#lexicalHandler">lexicalHandler</a></b> () const</td></tr>
 
47
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#parse">parse</a></b> ( const QXmlInputSource &amp; <i>input</i> )</td></tr>
 
48
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#parse-2">parse</a></b> ( const QXmlInputSource * <i>input</i> )</td></tr>
 
49
<tr><td class="memItemLeft" align="right" valign="top">virtual void * </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#property">property</a></b> ( const QString &amp; <i>name</i>, bool * <i>ok</i> = 0 ) const</td></tr>
 
50
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#setContentHandler">setContentHandler</a></b> ( QXmlContentHandler * <i>handler</i> )</td></tr>
 
51
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#setDTDHandler">setDTDHandler</a></b> ( QXmlDTDHandler * <i>handler</i> )</td></tr>
 
52
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#setDeclHandler">setDeclHandler</a></b> ( QXmlDeclHandler * <i>handler</i> )</td></tr>
 
53
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#setEntityResolver">setEntityResolver</a></b> ( QXmlEntityResolver * <i>handler</i> )</td></tr>
 
54
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#setErrorHandler">setErrorHandler</a></b> ( QXmlErrorHandler * <i>handler</i> )</td></tr>
 
55
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#setFeature">setFeature</a></b> ( const QString &amp; <i>name</i>, bool <i>enable</i> )</td></tr>
 
56
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#setLexicalHandler">setLexicalHandler</a></b> ( QXmlLexicalHandler * <i>handler</i> )</td></tr>
 
57
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qxmlsimplereader.html#setProperty">setProperty</a></b> ( const QString &amp; <i>name</i>, void * <i>value</i> )</td></tr>
 
58
</table>
 
59
<ul>
 
60
<li><div bar="2" class="fn"></div>19 public functions inherited from <a href="qxmlreader.html#public-functions">QXmlReader</a></li>
35
61
</ul>
36
62
<a name="details"></a>
37
63
<hr />
53
79
     if (!ok)
54
80
         std::cout &lt;&lt; &quot;Parsing failed.&quot; &lt;&lt; std::endl;</pre>
55
81
<p>If you can't parse the entire input in one go (for example, it is huge, or is being delivered over a network connection), data can be fed to the parser in pieces. This is achieved by telling <a href="qxmlsimplereader.html#parse">parse</a>() to work incrementally, and making subsequent calls to the <a href="qxmlsimplereader.html#parseContinue">parseContinue</a>() function, until all the data has been processed.</p>
56
 
<p>A common way to perform incremental parsing is to connect the <tt>readyRead()</tt> signal of the input source to a slot, and handle the incoming data there. For example, the following code shows how a parser for <a href="http://web.resource.org/rss/1.0/">RSS feeds</a> can be used to incrementally parse data that it receives from a <a href="qhttp.html">QHttp</a> object:</p>
57
 
<pre> void RSSListing::readData(const QHttpResponseHeader &amp;resp)
58
 
 {
59
 
     bool ok;
60
 
 
61
 
     if (resp.statusCode() != 200)
62
 
         http.abort();
63
 
     else {
64
 
         xmlInput.setData(http.readAll());
65
 
 
66
 
         if (newInformation) {
67
 
             ok = xmlReader.parse(&amp;xmlInput, true);
68
 
             newInformation = false;
69
 
         }
70
 
         else
71
 
             ok = xmlReader.parseContinue();
72
 
 
73
 
         if (!ok)
74
 
             http.abort();
75
 
     }
76
 
 }</pre>
77
 
<p>Aspects of the parsing behavior can be adapted using <a href="qxmlsimplereader.html#setFeature">setFeature</a>() and <a href="qxmlreader.html#setProperty">setProperty</a>(). For example, the following code could be used to enable reporting of namespace prefixes to the content handler:</p>
 
82
<p>A common way to perform incremental parsing is to connect the <tt>readyRead()</tt> signal of a <a href="qnetworkreply.html">network reply</a> a slot, and handle the incoming data there. See <a href="qnetworkaccessmanager.html">QNetworkAccessManager</a>.</p>
 
83
<p>Aspects of the parsing behavior can be adapted using <a href="qxmlsimplereader.html#setFeature">setFeature</a>() and <a href="qxmlsimplereader.html#setProperty">setProperty</a>().</p>
78
84
<p>QXmlSimpleReader is not reentrant. If you want to use the class in threaded code, lock the code using QXmlSimpleReader with a locking mechanism, such as a <a href="qmutex.html">QMutex</a>.</p>
79
85
<pre> xmlReader.setFeature(&quot;http:<span class="comment">//xml.org/sax/features/namespace-prefixes&quot;, true);</span></pre>
80
86
<hr />
81
87
<h2>Member Function Documentation</h2>
 
88
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/QXmlSimpleReader" />
82
89
<h3 class="fn"><a name="QXmlSimpleReader"></a>QXmlSimpleReader::QXmlSimpleReader ()</h3>
83
90
<p>Constructs a simple XML reader.</p>
 
91
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/~QXmlSimpleReader" />
84
92
<h3 class="fn"><a name="dtor.QXmlSimpleReader"></a>QXmlSimpleReader::~QXmlSimpleReader ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
85
93
<p>Destroys the simple XML reader.</p>
86
 
<h3 class="fn"><a name="parse"></a>bool QXmlSimpleReader::parse ( const <a href="qxmlinputsource.html">QXmlInputSource</a> * <i>input</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
94
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/DTDHandler" />
 
95
<h3 class="fn"><a name="DTDHandler"></a><a href="qxmldtdhandler.html">QXmlDTDHandler</a> * QXmlSimpleReader::DTDHandler () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
96
<p>Reimplemented from <a href="qxmlreader.html#DTDHandler">QXmlReader::DTDHandler</a>().</p>
 
97
<p>See also <a href="qxmlsimplereader.html#setDTDHandler">setDTDHandler</a>().</p>
 
98
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/contentHandler" />
 
99
<h3 class="fn"><a name="contentHandler"></a><a href="qxmlcontenthandler.html">QXmlContentHandler</a> * QXmlSimpleReader::contentHandler () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
100
<p>Reimplemented from <a href="qxmlreader.html#contentHandler">QXmlReader::contentHandler</a>().</p>
 
101
<p>See also <a href="qxmlsimplereader.html#setContentHandler">setContentHandler</a>().</p>
 
102
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/declHandler" />
 
103
<h3 class="fn"><a name="declHandler"></a><a href="qxmldeclhandler.html">QXmlDeclHandler</a> * QXmlSimpleReader::declHandler () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
104
<p>Reimplemented from <a href="qxmlreader.html#declHandler">QXmlReader::declHandler</a>().</p>
 
105
<p>See also <a href="qxmlsimplereader.html#setDeclHandler">setDeclHandler</a>().</p>
 
106
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/entityResolver" />
 
107
<h3 class="fn"><a name="entityResolver"></a><a href="qxmlentityresolver.html">QXmlEntityResolver</a> * QXmlSimpleReader::entityResolver () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
108
<p>Reimplemented from <a href="qxmlreader.html#entityResolver">QXmlReader::entityResolver</a>().</p>
 
109
<p>See also <a href="qxmlsimplereader.html#setEntityResolver">setEntityResolver</a>().</p>
 
110
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/errorHandler" />
 
111
<h3 class="fn"><a name="errorHandler"></a><a href="qxmlerrorhandler.html">QXmlErrorHandler</a> * QXmlSimpleReader::errorHandler () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
112
<p>Reimplemented from <a href="qxmlreader.html#errorHandler">QXmlReader::errorHandler</a>().</p>
 
113
<p>See also <a href="qxmlsimplereader.html#setErrorHandler">setErrorHandler</a>().</p>
 
114
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/feature" />
 
115
<h3 class="fn"><a name="feature"></a>bool QXmlSimpleReader::feature ( const <a href="qstring.html">QString</a> &amp; <i>name</i>, bool * <i>ok</i> = 0 ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
116
<p>Reimplemented from <a href="qxmlreader.html#feature">QXmlReader::feature</a>().</p>
 
117
<p>See also <a href="qxmlsimplereader.html#setFeature">setFeature</a>().</p>
 
118
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/hasFeature" />
 
119
<h3 class="fn"><a name="hasFeature"></a>bool QXmlSimpleReader::hasFeature ( const <a href="qstring.html">QString</a> &amp; <i>name</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
120
<p>Reimplemented from <a href="qxmlreader.html#hasFeature">QXmlReader::hasFeature</a>().</p>
 
121
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/hasProperty" />
 
122
<h3 class="fn"><a name="hasProperty"></a>bool QXmlSimpleReader::hasProperty ( const <a href="qstring.html">QString</a> &amp; <i>name</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
123
<p>Reimplemented from <a href="qxmlreader.html#hasProperty">QXmlReader::hasProperty</a>().</p>
 
124
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/lexicalHandler" />
 
125
<h3 class="fn"><a name="lexicalHandler"></a><a href="qxmllexicalhandler.html">QXmlLexicalHandler</a> * QXmlSimpleReader::lexicalHandler () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
126
<p>Reimplemented from <a href="qxmlreader.html#lexicalHandler">QXmlReader::lexicalHandler</a>().</p>
 
127
<p>See also <a href="qxmlsimplereader.html#setLexicalHandler">setLexicalHandler</a>().</p>
 
128
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/parse" />
 
129
<h3 class="fn"><a name="parse"></a>bool QXmlSimpleReader::parse ( const <a href="qxmlinputsource.html">QXmlInputSource</a> &amp; <i>input</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
130
<p>Reimplemented from <a href="qxmlreader-obsolete.html#parse-2" class="obsolete">QXmlReader::parse</a>().</p>
 
131
<h3 class="fn"><a name="parse-2"></a>bool QXmlSimpleReader::parse ( const <a href="qxmlinputsource.html">QXmlInputSource</a> * <i>input</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
132
<p>Reimplemented from <a href="qxmlreader.html#parse">QXmlReader::parse</a>().</p>
87
133
<p>Reads an XML document from <i>input</i> and parses it in one pass (non-incrementally). Returns true if the parsing was successful; otherwise returns false.</p>
88
 
<p>Reimplemented from <a href="qxmlreader.html#parse">QXmlReader</a>.</p>
89
134
<h3 class="fn"><a name="parse-3"></a>bool QXmlSimpleReader::parse ( const <a href="qxmlinputsource.html">QXmlInputSource</a> * <i>input</i>, bool <i>incremental</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
90
135
<p>Reads an XML document from <i>input</i> and parses it. Returns true if the parsing is completed successfully; otherwise returns false, indicating that an error occurred.</p>
91
136
<p>If <i>incremental</i> is false, this function will return false if the XML file is not read completely. The parsing cannot be continued in this case.</p>
92
137
<p>If <i>incremental</i> is true, the parser does not return false if it reaches the end of the <i>input</i> before reaching the end of the XML file. Instead, it stores the state of the parser so that parsing can be continued later when more data is available. In such a case, you can use the function <a href="qxmlsimplereader.html#parseContinue">parseContinue</a>() to continue with parsing. This class stores a pointer to the input source <i>input</i> and the <a href="qxmlsimplereader.html#parseContinue">parseContinue</a>() function tries to read from that input source. Therefore, you should not delete the input source <i>input</i> until you no longer need to call <a href="qxmlsimplereader.html#parseContinue">parseContinue</a>().</p>
93
138
<p>If this function is called with <i>incremental</i> set to true while an incremental parse is in progress, a new parsing session will be started, and the previous session will be lost.</p>
94
139
<p>See also <a href="qxmlsimplereader.html#parseContinue">parseContinue</a>() and <a href="qtcpsocket.html">QTcpSocket</a>.</p>
 
140
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/parseContinue" />
95
141
<h3 class="fn"><a name="parseContinue"></a>bool QXmlSimpleReader::parseContinue ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
96
142
<p>Continues incremental parsing, taking input from the <a href="qxmlinputsource.html">QXmlInputSource</a> that was specified with the most recent call to <a href="qxmlsimplereader.html#parse">parse</a>(). To use this function, you <i>must</i> have called <a href="qxmlsimplereader.html#parse">parse</a>() with the incremental argument set to true.</p>
97
143
<p>Returns false if a parsing error occurs; otherwise returns true, even if the end of the XML file has not been reached. You can continue parsing at a later stage by calling this function again when there is more data available to parse.</p>
98
144
<p>Calling this function when there is no data available in the input source indicates to the reader that the end of the XML file has been reached. If the input supplied up to this point was not well-formed then a parsing error occurs, and false is returned. If the input supplied was well-formed, true is returned. It is important to end the input in this way because it allows you to reuse the reader to parse other XML files.</p>
99
145
<p>Calling this function after the end of file has been reached, but without available data will cause false to be returned whether the previous input was well-formed or not.</p>
100
146
<p>See also <a href="qxmlsimplereader.html#parse">parse</a>(), <a href="qxmlinputsource.html#data">QXmlInputSource::data</a>(), and <a href="qxmlinputsource.html#next">QXmlInputSource::next</a>().</p>
 
147
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/property" />
 
148
<h3 class="fn"><a name="property"></a>void * QXmlSimpleReader::property ( const <a href="qstring.html">QString</a> &amp; <i>name</i>, bool * <i>ok</i> = 0 ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
149
<p>Reimplemented from <a href="qxmlreader.html#property">QXmlReader::property</a>().</p>
 
150
<p>See also <a href="qxmlsimplereader.html#setProperty">setProperty</a>().</p>
 
151
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/setContentHandler" />
 
152
<h3 class="fn"><a name="setContentHandler"></a>void QXmlSimpleReader::setContentHandler ( <a href="qxmlcontenthandler.html">QXmlContentHandler</a> * <i>handler</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
153
<p>Reimplemented from <a href="qxmlreader.html#setContentHandler">QXmlReader::setContentHandler</a>().</p>
 
154
<p>See also <a href="qxmlsimplereader.html#contentHandler">contentHandler</a>().</p>
 
155
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/setDTDHandler" />
 
156
<h3 class="fn"><a name="setDTDHandler"></a>void QXmlSimpleReader::setDTDHandler ( <a href="qxmldtdhandler.html">QXmlDTDHandler</a> * <i>handler</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
157
<p>Reimplemented from <a href="qxmlreader.html#setDTDHandler">QXmlReader::setDTDHandler</a>().</p>
 
158
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/setDeclHandler" />
 
159
<h3 class="fn"><a name="setDeclHandler"></a>void QXmlSimpleReader::setDeclHandler ( <a href="qxmldeclhandler.html">QXmlDeclHandler</a> * <i>handler</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
160
<p>Reimplemented from <a href="qxmlreader.html#setDeclHandler">QXmlReader::setDeclHandler</a>().</p>
 
161
<p>See also <a href="qxmlsimplereader.html#declHandler">declHandler</a>().</p>
 
162
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/setEntityResolver" />
 
163
<h3 class="fn"><a name="setEntityResolver"></a>void QXmlSimpleReader::setEntityResolver ( <a href="qxmlentityresolver.html">QXmlEntityResolver</a> * <i>handler</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
164
<p>Reimplemented from <a href="qxmlreader.html#setEntityResolver">QXmlReader::setEntityResolver</a>().</p>
 
165
<p>See also <a href="qxmlsimplereader.html#entityResolver">entityResolver</a>().</p>
 
166
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/setErrorHandler" />
 
167
<h3 class="fn"><a name="setErrorHandler"></a>void QXmlSimpleReader::setErrorHandler ( <a href="qxmlerrorhandler.html">QXmlErrorHandler</a> * <i>handler</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
168
<p>Reimplemented from <a href="qxmlreader.html#setErrorHandler">QXmlReader::setErrorHandler</a>().</p>
 
169
<p>See also <a href="qxmlsimplereader.html#errorHandler">errorHandler</a>().</p>
 
170
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/setFeature" />
101
171
<h3 class="fn"><a name="setFeature"></a>void QXmlSimpleReader::setFeature ( const <a href="qstring.html">QString</a> &amp; <i>name</i>, bool <i>enable</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
172
<p>Reimplemented from <a href="qxmlreader.html#setFeature">QXmlReader::setFeature</a>().</p>
102
173
<p>Turns on the feature <i>name</i> if <i>enable</i> is true; otherwise turns it off.</p>
103
174
<p>The <i>name</i> parameter must be one of the following strings:</p>
104
 
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
 
175
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
105
176
<thead><tr valign="top" class="qt-style"><th>Feature</th><th>Default</th><th>Notes</th></tr></thead>
106
177
<tr valign="top" class="odd"><td><i>http://xml.org/sax/features/namespaces</i></td><td>true</td><td>If enabled, namespaces are reported to the content handler.</td></tr>
107
178
<tr valign="top" class="even"><td><i>http://xml.org/sax/features/namespace-prefixes</i></td><td>false</td><td>If enabled, the original prefixed names and attributes used for namespace declarations are reported.</td></tr>
108
179
<tr valign="top" class="odd"><td><i>http://trolltech.com/xml/features/report-whitespace-only-CharData</i></td><td>true</td><td>If enabled, CharData that consist of only whitespace characters are reported using <a href="qxmlcontenthandler.html#characters">QXmlContentHandler::characters</a>(). If disabled, whitespace is silently discarded.</td></tr>
109
180
<tr valign="top" class="even"><td><i>http://trolltech.com/xml/features/report-start-end-entity</i></td><td>false</td><td>If enabled, the parser reports QXmlContentHandler::startEntity() and QXmlContentHandler::endEntity() events, so character data might be reported in chunks. If disabled, the parser does not report these events, but silently substitutes the entities, and reports the character data in one chunk.</td></tr>
110
181
</table></p>
111
 
<p>Reimplemented from <a href="qxmlreader.html#setFeature">QXmlReader</a>.</p>
112
 
<p>See also <a href="qxmlreader.html#feature">feature</a>(), <a href="qxmlreader.html#hasFeature">hasFeature</a>(), and <a href="qtxml.html#sax2-features">SAX2 Features</a>.</p>
 
182
<p>See also <a href="qxmlsimplereader.html#feature">feature</a>(), <a href="qxmlsimplereader.html#hasFeature">hasFeature</a>(), and <a href="xml-sax.html#sax2-features">SAX2 Features</a>.</p>
 
183
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/setLexicalHandler" />
 
184
<h3 class="fn"><a name="setLexicalHandler"></a>void QXmlSimpleReader::setLexicalHandler ( <a href="qxmllexicalhandler.html">QXmlLexicalHandler</a> * <i>handler</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
185
<p>Reimplemented from <a href="qxmlreader.html#setLexicalHandler">QXmlReader::setLexicalHandler</a>().</p>
 
186
<p>See also <a href="qxmlsimplereader.html#lexicalHandler">lexicalHandler</a>().</p>
 
187
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/setProperty" />
 
188
<h3 class="fn"><a name="setProperty"></a>void QXmlSimpleReader::setProperty ( const <a href="qstring.html">QString</a> &amp; <i>name</i>, void * <i>value</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
189
<p>Reimplemented from <a href="qxmlreader.html#setProperty">QXmlReader::setProperty</a>().</p>
 
190
<p>See also <a href="qxmlsimplereader.html#property">property</a>().</p>
113
191
<p /><address><hr /><div align="center">
114
192
<table width="100%" cellspacing="0" border="0"><tr class="address">
115
 
<td width="30%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
116
 
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
117
 
<td width="30%" align="right"><div align="right">Qt 4.5.2</div></td>
118
 
</tr></table></div></address></body>
 
193
<td width="40%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
 
194
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
195
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
 
196
<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>
119
197
</html>