~ubuntu-branches/ubuntu/precise/python-qt4/precise-proposed

« back to all changes in this revision

Viewing changes to doc/html/qxmlsimplereader.html

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell, Jonathan Riddell
  • Date: 2010-11-08 16:13:33 UTC
  • mfrom: (1.5.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20101108161333-0nec4wu0nz3wpf9r
Tags: 4.8.1-0ubuntu1
[ Jonathan Riddell ]
* New upstream release
* Build against python-sip-dev 4.11.2
* Remove kubuntu_02_fix-scpk-and-flag-issue.diff merged upstream
* Install __init__.py into /usr/lib/python3.2/dist-packages/PyQt4,
  fixes Python 3 support
* Add QtDeclarative to python-qt4
* Add kubuntu_03_uiparser.diff from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
td.postheader { font-family: sans-serif }
7
7
tr.address { font-family: sans-serif }
8
8
body { background: #ffffff; color: black; }
9
 
</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="../pyqt4ref.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">QXmlSimpleReader Class Reference<br /><sup><sup>[<a href="qtxml.html">QtXml</a> module]</sup></sup></h1><p>The QXmlSimpleReader class provides an implementation of a simple XML parser. <a href="#details">More...</a></p>
10
 
<p>Inherits <a href="qxmlreader.html">QXmlReader</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qxmlsimplereader.html#QXmlSimpleReader">__init__</a></b> (<i>self</i>)</li><li><div class="fn" />QXmlContentHandler <b><a href="qxmlsimplereader.html#contentHandler">contentHandler</a></b> (<i>self</i>)</li><li><div class="fn" />QXmlDeclHandler <b><a href="qxmlsimplereader.html#declHandler">declHandler</a></b> (<i>self</i>)</li><li><div class="fn" />QXmlDTDHandler <b><a href="qxmlsimplereader.html#DTDHandler">DTDHandler</a></b> (<i>self</i>)</li><li><div class="fn" />QXmlEntityResolver <b><a href="qxmlsimplereader.html#entityResolver">entityResolver</a></b> (<i>self</i>)</li><li><div class="fn" />QXmlErrorHandler <b><a href="qxmlsimplereader.html#errorHandler">errorHandler</a></b> (<i>self</i>)</li><li><div class="fn" />(bool, bool&#160;<i>ok</i>) <b><a href="qxmlsimplereader.html#feature">feature</a></b> (<i>self</i>, QString)</li><li><div class="fn" />bool <b><a href="qxmlsimplereader.html#hasFeature">hasFeature</a></b> (<i>self</i>, QString)</li><li><div class="fn" />bool <b><a href="qxmlsimplereader.html#hasProperty">hasProperty</a></b> (<i>self</i>, QString)</li><li><div class="fn" />QXmlLexicalHandler <b><a href="qxmlsimplereader.html#lexicalHandler">lexicalHandler</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qxmlsimplereader.html#parse">parse</a></b> (<i>self</i>, QXmlInputSource)</li><li><div class="fn" />bool <b><a href="qxmlsimplereader.html#parse-2">parse</a></b> (<i>self</i>, QXmlInputSource, bool)</li><li><div class="fn" />bool <b><a href="qxmlsimplereader.html#parseContinue">parseContinue</a></b> (<i>self</i>)</li><li><div class="fn" />(sip.voidptr, bool&#160;<i>ok</i>) <b><a href="qxmlsimplereader.html#property">property</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qxmlsimplereader.html#setContentHandler">setContentHandler</a></b> (<i>self</i>, QXmlContentHandler)</li><li><div class="fn" /><b><a href="qxmlsimplereader.html#setDeclHandler">setDeclHandler</a></b> (<i>self</i>, QXmlDeclHandler)</li><li><div class="fn" /><b><a href="qxmlsimplereader.html#setDTDHandler">setDTDHandler</a></b> (<i>self</i>, QXmlDTDHandler)</li><li><div class="fn" /><b><a href="qxmlsimplereader.html#setEntityResolver">setEntityResolver</a></b> (<i>self</i>, QXmlEntityResolver)</li><li><div class="fn" /><b><a href="qxmlsimplereader.html#setErrorHandler">setErrorHandler</a></b> (<i>self</i>, QXmlErrorHandler)</li><li><div class="fn" /><b><a href="qxmlsimplereader.html#setFeature">setFeature</a></b> (<i>self</i>, QString, bool)</li><li><div class="fn" /><b><a href="qxmlsimplereader.html#setLexicalHandler">setLexicalHandler</a></b> (<i>self</i>, QXmlLexicalHandler)</li><li><div class="fn" /><b><a href="qxmlsimplereader.html#setProperty">setProperty</a></b> (<i>self</i>, QString, sip.voidptr)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QXmlSimpleReader class provides an implementation of a simple XML parser.</p>
11
 
<p>This XML reader is suitable for a wide range of applications. It is able to parse well-formed XML and can report the namespaces of elements to a content handler; however, it does not parse any external entities. For historical reasons, Attribute Value Normalization and End-of-Line Handling as described in the XML 1.0 specification is not performed.</p>
12
 
<p>The easiest pattern of use for this class is to create a reader instance, define an input source, specify the handlers to be used by the reader, and parse the data.</p>
13
 
<p>For example, we could use a <a href="qfile.html">QFile</a> to supply the input. Here, we create a reader, and define an input source to be used by the reader:</p>
14
 
<pre>     QXmlSimpleReader xmlReader;
15
 
     QXmlInputSource *source = new QXmlInputSource(file);</pre>
16
 
<p>A handler lets us perform actions when the reader encounters certain types of content, or if errors in the input are found. The reader must be told which handler to use for each type of event. For many common applications, we can create a custom handler by subclassing <a href="qxmldefaulthandler.html">QXmlDefaultHandler</a>, and use this to handle both error and content events:</p>
17
 
<pre>     Handler *handler = new Handler;
 
9
</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="../pyqt4ref.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">QXmlSimpleReader Class Reference<br /><sup><sup>[<a href="qtxml.html">QtXml</a> module]</sup></sup></h1><p>The QXmlSimpleReader class provides an implementation of a
 
10
simple XML parser. <a href="#details">More...</a></p>
 
11
 
 
12
<p>Inherits <a href="qxmlreader.html">QXmlReader</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qxmlsimplereader.html#QXmlSimpleReader">__init__</a></b> (<i>self</i>)</li><li><div class="fn" />QXmlContentHandler <b><a href="qxmlsimplereader.html#contentHandler">contentHandler</a></b> (<i>self</i>)</li><li><div class="fn" />QXmlDeclHandler <b><a href="qxmlsimplereader.html#declHandler">declHandler</a></b> (<i>self</i>)</li><li><div class="fn" />QXmlDTDHandler <b><a href="qxmlsimplereader.html#DTDHandler">DTDHandler</a></b> (<i>self</i>)</li><li><div class="fn" />QXmlEntityResolver <b><a href="qxmlsimplereader.html#entityResolver">entityResolver</a></b> (<i>self</i>)</li><li><div class="fn" />QXmlErrorHandler <b><a href="qxmlsimplereader.html#errorHandler">errorHandler</a></b> (<i>self</i>)</li><li><div class="fn" />(bool, bool&#160;<i>ok</i>) <b><a href="qxmlsimplereader.html#feature">feature</a></b> (<i>self</i>, QString)</li><li><div class="fn" />bool <b><a href="qxmlsimplereader.html#hasFeature">hasFeature</a></b> (<i>self</i>, QString)</li><li><div class="fn" />bool <b><a href="qxmlsimplereader.html#hasProperty">hasProperty</a></b> (<i>self</i>, QString)</li><li><div class="fn" />QXmlLexicalHandler <b><a href="qxmlsimplereader.html#lexicalHandler">lexicalHandler</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qxmlsimplereader.html#parse">parse</a></b> (<i>self</i>, QXmlInputSource)</li><li><div class="fn" />bool <b><a href="qxmlsimplereader.html#parse-2">parse</a></b> (<i>self</i>, QXmlInputSource, bool)</li><li><div class="fn" />bool <b><a href="qxmlsimplereader.html#parseContinue">parseContinue</a></b> (<i>self</i>)</li><li><div class="fn" />(sip.voidptr, bool&#160;<i>ok</i>) <b><a href="qxmlsimplereader.html#property">property</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qxmlsimplereader.html#setContentHandler">setContentHandler</a></b> (<i>self</i>, QXmlContentHandler)</li><li><div class="fn" /><b><a href="qxmlsimplereader.html#setDeclHandler">setDeclHandler</a></b> (<i>self</i>, QXmlDeclHandler)</li><li><div class="fn" /><b><a href="qxmlsimplereader.html#setDTDHandler">setDTDHandler</a></b> (<i>self</i>, QXmlDTDHandler)</li><li><div class="fn" /><b><a href="qxmlsimplereader.html#setEntityResolver">setEntityResolver</a></b> (<i>self</i>, QXmlEntityResolver)</li><li><div class="fn" /><b><a href="qxmlsimplereader.html#setErrorHandler">setErrorHandler</a></b> (<i>self</i>, QXmlErrorHandler)</li><li><div class="fn" /><b><a href="qxmlsimplereader.html#setFeature">setFeature</a></b> (<i>self</i>, QString, bool)</li><li><div class="fn" /><b><a href="qxmlsimplereader.html#setLexicalHandler">setLexicalHandler</a></b> (<i>self</i>, QXmlLexicalHandler)</li><li><div class="fn" /><b><a href="qxmlsimplereader.html#setProperty">setProperty</a></b> (<i>self</i>, QString, sip.voidptr)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QXmlSimpleReader class provides an implementation of a
 
13
simple XML parser.</p>
 
14
<p>This XML reader is suitable for a wide range of applications. It
 
15
is able to parse well-formed XML and can report the namespaces of
 
16
elements to a content handler; however, it does not parse any
 
17
external entities. For historical reasons, Attribute Value
 
18
Normalization and End-of-Line Handling as described in the XML 1.0
 
19
specification is not performed.</p>
 
20
<p>The easiest pattern of use for this class is to create a reader
 
21
instance, define an input source, specify the handlers to be used
 
22
by the reader, and parse the data.</p>
 
23
<p>For example, we could use a <a href="qfile.html">QFile</a> to
 
24
supply the input. Here, we create a reader, and define an input
 
25
source to be used by the reader:</p>
 
26
<pre class="highlightedCode brush: cpp">
 
27
     QXmlSimpleReader xmlReader;
 
28
     QXmlInputSource *source = new QXmlInputSource(file);
 
29
</pre>
 
30
<p>A handler lets us perform actions when the reader encounters
 
31
certain types of content, or if errors in the input are found. The
 
32
reader must be told which handler to use for each type of event.
 
33
For many common applications, we can create a custom handler by
 
34
subclassing <a href="qxmldefaulthandler.html">QXmlDefaultHandler</a>, and use this to
 
35
handle both error and content events:</p>
 
36
<pre class="highlightedCode brush: cpp">
 
37
     Handler *handler = new Handler;
18
38
     xmlReader.setContentHandler(handler);
19
 
     xmlReader.setErrorHandler(handler);</pre>
20
 
<p>If you don't set at least the content and error handlers, the parser will fall back on its default behavior---and will do nothing.</p>
21
 
<p>The most convenient way to handle the input is to read it in a single pass using the <a href="qxmlsimplereader.html#parse">parse</a>() function with an argument that specifies the input source:</p>
22
 
<pre>     bool ok = xmlReader.parse(source);
 
39
     xmlReader.setErrorHandler(handler);
 
40
</pre>
 
41
<p>If you don't set at least the content and error handlers, the
 
42
parser will fall back on its default behavior---and will do
 
43
nothing.</p>
 
44
<p>The most convenient way to handle the input is to read it in a
 
45
single pass using the <a href="qxmlsimplereader.html#parse">parse</a>() function with an argument
 
46
that specifies the input source:</p>
 
47
<pre class="highlightedCode brush: cpp">
 
48
     bool ok = xmlReader.parse(source);
23
49
 
24
50
     if (!ok)
25
 
         std.cout &lt;&lt; "Parsing failed." &lt;&lt; std.endl;</pre>
26
 
<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>
27
 
<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>
 
51
         std.cout &lt;&lt; "Parsing failed." &lt;&lt; std.endl;
 
52
</pre>
 
53
<p>If you can't parse the entire input in one go (for example, it
 
54
is huge, or is being delivered over a network connection), data can
 
55
be fed to the parser in pieces. This is achieved by telling
 
56
<a href="qxmlsimplereader.html#parse">parse</a>() to work
 
57
incrementally, and making subsequent calls to the <a href="qxmlsimplereader.html#parseContinue">parseContinue</a>() function,
 
58
until all the data has been processed.</p>
 
59
<p>A common way to perform incremental parsing is to connect the
 
60
<tt>readyRead()</tt> signal of a <a href="qnetworkreply.html">network reply</a> a slot, and handle the
 
61
incoming data there. See <a href="qnetworkaccessmanager.html">QNetworkAccessManager</a>.</p>
28
62
<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>
29
 
<pre> xmlReader.setFeature("http:<span class="comment">//xml.org/sax/features/namespace-prefixes", true);</span></pre>
30
 
<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>
 
63
<pre class="highlightedCode brush: cpp">
 
64
 xmlReader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
 
65
</pre>
 
66
<p>QXmlSimpleReader is not reentrant. If you want to use the class
 
67
in threaded code, lock the code using QXmlSimpleReader with a
 
68
locking mechanism, such as a <a href="qmutex.html">QMutex</a>.</p>
31
69
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QXmlSimpleReader" />QXmlSimpleReader.__init__ (<i>self</i>)</h3><p>Constructs a simple XML reader.</p>
32
 
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/~QXmlSimpleReader" />
 
70
 
 
71
 
33
72
<h3 class="fn"><a name="contentHandler" /><a href="qxmlcontenthandler.html">QXmlContentHandler</a> QXmlSimpleReader.contentHandler (<i>self</i>)</h3><p>Reimplemented from <a href="qxmlreader.html#contentHandler">QXmlReader.contentHandler</a>().</p>
34
73
<p>See also <a href="qxmlsimplereader.html#setContentHandler">setContentHandler</a>().</p>
35
 
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/declHandler" />
 
74
 
 
75
 
36
76
<h3 class="fn"><a name="declHandler" /><a href="qxmldeclhandler.html">QXmlDeclHandler</a> QXmlSimpleReader.declHandler (<i>self</i>)</h3><p>Reimplemented from <a href="qxmlreader.html#declHandler">QXmlReader.declHandler</a>().</p>
37
77
<p>See also <a href="qxmlsimplereader.html#setDeclHandler">setDeclHandler</a>().</p>
38
 
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/entityResolver" />
 
78
 
 
79
 
39
80
<h3 class="fn"><a name="DTDHandler" /><a href="qxmldtdhandler.html">QXmlDTDHandler</a> QXmlSimpleReader.DTDHandler (<i>self</i>)</h3><p>Reimplemented from <a href="qxmlreader.html#DTDHandler">QXmlReader.DTDHandler</a>().</p>
40
81
<p>See also <a href="qxmlsimplereader.html#setDTDHandler">setDTDHandler</a>().</p>
41
 
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/contentHandler" />
 
82
 
 
83
 
42
84
<h3 class="fn"><a name="entityResolver" /><a href="qxmlentityresolver.html">QXmlEntityResolver</a> QXmlSimpleReader.entityResolver (<i>self</i>)</h3><p>Reimplemented from <a href="qxmlreader.html#entityResolver">QXmlReader.entityResolver</a>().</p>
43
85
<p>See also <a href="qxmlsimplereader.html#setEntityResolver">setEntityResolver</a>().</p>
44
 
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/errorHandler" />
 
86
 
 
87
 
45
88
<h3 class="fn"><a name="errorHandler" /><a href="qxmlerrorhandler.html">QXmlErrorHandler</a> QXmlSimpleReader.errorHandler (<i>self</i>)</h3><p>Reimplemented from <a href="qxmlreader.html#errorHandler">QXmlReader.errorHandler</a>().</p>
46
89
<p>See also <a href="qxmlsimplereader.html#setErrorHandler">setErrorHandler</a>().</p>
47
 
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/feature" />
 
90
 
 
91
 
48
92
<h3 class="fn"><a name="feature" />(bool, bool&#160;<i>ok</i>) QXmlSimpleReader.feature (<i>self</i>, QString)</h3><p>Reimplemented from <a href="qxmlreader.html#feature">QXmlReader.feature</a>().</p>
49
93
<p>See also <a href="qxmlsimplereader.html#setFeature">setFeature</a>().</p>
50
 
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/hasFeature" />
 
94
 
 
95
 
51
96
<h3 class="fn"><a name="hasFeature" />bool QXmlSimpleReader.hasFeature (<i>self</i>, QString)</h3><p>Reimplemented from <a href="qxmlreader.html#hasFeature">QXmlReader.hasFeature</a>().</p>
52
 
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/hasProperty" />
 
97
 
 
98
 
53
99
<h3 class="fn"><a name="hasProperty" />bool QXmlSimpleReader.hasProperty (<i>self</i>, QString)</h3><p>Reimplemented from <a href="qxmlreader.html#hasProperty">QXmlReader.hasProperty</a>().</p>
54
 
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/lexicalHandler" />
 
100
 
 
101
 
55
102
<h3 class="fn"><a name="lexicalHandler" /><a href="qxmllexicalhandler.html">QXmlLexicalHandler</a> QXmlSimpleReader.lexicalHandler (<i>self</i>)</h3><p>Reimplemented from <a href="qxmlreader.html#lexicalHandler">QXmlReader.lexicalHandler</a>().</p>
56
103
<p>See also <a href="qxmlsimplereader.html#setLexicalHandler">setLexicalHandler</a>().</p>
57
 
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/parse" />
58
 
<h3 class="fn"><a name="parse" />bool QXmlSimpleReader.parse (<i>self</i>, <a href="qxmlinputsource.html">QXmlInputSource</a>)</h3><p>Reimplemented from <a class="obsolete" href="qxmlreader-obsolete.html#parse-2">QXmlReader.parse</a>().</p>
 
104
 
 
105
 
 
106
<h3 class="fn"><a name="parse" />bool QXmlSimpleReader.parse (<i>self</i>, <a href="qxmlinputsource.html">QXmlInputSource</a>)</h3><p>Reimplemented from <a class="obsolete" href="qxmlreader.html#parse-2">QXmlReader.parse</a>().</p>
 
107
 
 
108
 
59
109
<h3 class="fn"><a name="parse-2" />bool QXmlSimpleReader.parse (<i>self</i>, <a href="qxmlinputsource.html">QXmlInputSource</a>, bool)</h3><p>Reimplemented from <a href="qxmlreader.html#parse">QXmlReader.parse</a>().</p>
60
 
<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>
61
 
<h3 class="fn"><a name="parseContinue" />bool QXmlSimpleReader.parseContinue (<i>self</i>)</h3><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>
62
 
<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>
63
 
<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>
64
 
<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>
65
 
<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>
66
 
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/property" />
 
110
<p>Reads an XML document from <i>input</i> and parses it in one
 
111
pass (non-incrementally). Returns true if the parsing was
 
112
successful; otherwise returns false.</p>
 
113
 
 
114
 
 
115
<h3 class="fn"><a name="parseContinue" />bool QXmlSimpleReader.parseContinue (<i>self</i>)</h3><p>Continues incremental parsing, taking input from the <a href="qxmlinputsource.html">QXmlInputSource</a> that was specified with
 
116
the most recent call to <a href="qxmlsimplereader.html#parse">parse</a>(). To use this function,
 
117
you <i>must</i> have called <a href="qxmlsimplereader.html#parse">parse</a>() with the incremental
 
118
argument set to true.</p>
 
119
<p>Returns false if a parsing error occurs; otherwise returns true,
 
120
even if the end of the XML file has not been reached. You can
 
121
continue parsing at a later stage by calling this function again
 
122
when there is more data available to parse.</p>
 
123
<p>Calling this function when there is no data available in the
 
124
input source indicates to the reader that the end of the XML file
 
125
has been reached. If the input supplied up to this point was not
 
126
well-formed then a parsing error occurs, and false is returned. If
 
127
the input supplied was well-formed, true is returned. It is
 
128
important to end the input in this way because it allows you to
 
129
reuse the reader to parse other XML files.</p>
 
130
<p>Calling this function after the end of file has been reached,
 
131
but without available data will cause false to be returned whether
 
132
the previous input was well-formed or not.</p>
 
133
<p>See also <a href="qxmlsimplereader.html#parse">parse</a>(),
 
134
<a href="qxmlinputsource.html#data">QXmlInputSource.data</a>(),
 
135
and <a href="qxmlinputsource.html#next">QXmlInputSource.next</a>().</p>
 
136
 
 
137
 
67
138
<h3 class="fn"><a name="property" />(sip.voidptr, bool&#160;<i>ok</i>) QXmlSimpleReader.property (<i>self</i>, QString)</h3><p>Reimplemented from <a href="qxmlreader.html#property">QXmlReader.property</a>().</p>
68
139
<p>See also <a href="qxmlsimplereader.html#setProperty">setProperty</a>().</p>
69
 
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/setContentHandler" />
 
140
 
 
141
 
70
142
<h3 class="fn"><a name="setContentHandler" />QXmlSimpleReader.setContentHandler (<i>self</i>, <a href="qxmlcontenthandler.html">QXmlContentHandler</a>)</h3><p>Reimplemented from <a href="qxmlreader.html#setContentHandler">QXmlReader.setContentHandler</a>().</p>
71
143
<p>See also <a href="qxmlsimplereader.html#contentHandler">contentHandler</a>().</p>
72
 
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/setDTDHandler" />
 
144
 
 
145
 
73
146
<h3 class="fn"><a name="setDeclHandler" />QXmlSimpleReader.setDeclHandler (<i>self</i>, <a href="qxmldeclhandler.html">QXmlDeclHandler</a>)</h3><p>Reimplemented from <a href="qxmlreader.html#setDeclHandler">QXmlReader.setDeclHandler</a>().</p>
74
147
<p>See also <a href="qxmlsimplereader.html#declHandler">declHandler</a>().</p>
75
 
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/setEntityResolver" />
 
148
 
 
149
 
76
150
<h3 class="fn"><a name="setDTDHandler" />QXmlSimpleReader.setDTDHandler (<i>self</i>, <a href="qxmldtdhandler.html">QXmlDTDHandler</a>)</h3><p>Reimplemented from <a href="qxmlreader.html#setDTDHandler">QXmlReader.setDTDHandler</a>().</p>
77
 
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/setDeclHandler" />
 
151
 
 
152
 
78
153
<h3 class="fn"><a name="setEntityResolver" />QXmlSimpleReader.setEntityResolver (<i>self</i>, <a href="qxmlentityresolver.html">QXmlEntityResolver</a>)</h3><p>Reimplemented from <a href="qxmlreader.html#setEntityResolver">QXmlReader.setEntityResolver</a>().</p>
79
154
<p>See also <a href="qxmlsimplereader.html#entityResolver">entityResolver</a>().</p>
80
 
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/setErrorHandler" />
 
155
 
 
156
 
81
157
<h3 class="fn"><a name="setErrorHandler" />QXmlSimpleReader.setErrorHandler (<i>self</i>, <a href="qxmlerrorhandler.html">QXmlErrorHandler</a>)</h3><p>Reimplemented from <a href="qxmlreader.html#setErrorHandler">QXmlReader.setErrorHandler</a>().</p>
82
158
<p>See also <a href="qxmlsimplereader.html#errorHandler">errorHandler</a>().</p>
83
 
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/setFeature" />
 
159
 
 
160
 
84
161
<h3 class="fn"><a name="setFeature" />QXmlSimpleReader.setFeature (<i>self</i>, QString, bool)</h3><p>Reimplemented from <a href="qxmlreader.html#setFeature">QXmlReader.setFeature</a>().</p>
85
 
<p>Turns on the feature <i>name</i> if <i>enable</i> is true; otherwise turns it off.</p>
86
 
<p>The <i>name</i> parameter must be one of the following strings:</p>
87
 
<p><table align="center" border="0" cellpadding="2" cellspacing="1" class="generic">
88
 
<thead><tr class="qt-style" valign="top"><th>Feature</th><th>Default</th><th>Notes</th></tr></thead>
89
 
<tr class="odd" valign="top"><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>
90
 
<tr class="even" valign="top"><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>
91
 
<tr class="odd" valign="top"><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>
92
 
<tr class="even" valign="top"><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>
93
 
</table></p>
94
 
<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>
95
 
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/setLexicalHandler" />
 
162
<p>Turns on the feature <i>name</i> if <i>enable</i> is true;
 
163
otherwise turns it off.</p>
 
164
<p>The <i>name</i> parameter must be one of the following
 
165
strings:</p>
 
166
<table class="generic">
 
167
<thead>
 
168
<tr class="qt-style topAlign">
 
169
<th>Feature</th>
 
170
<th>Default</th>
 
171
<th>Notes</th>
 
172
</tr>
 
173
</thead>
 
174
<tr class="odd topAlign">
 
175
<td>
 
176
<p><i>http://xml.org/sax/features/namespaces</i></p>
 
177
</td>
 
178
<td>
 
179
<p>true</p>
 
180
</td>
 
181
<td>
 
182
<p>If enabled, namespaces are reported to the content handler.</p>
 
183
</td>
 
184
</tr>
 
185
<tr class="even topAlign">
 
186
<td>
 
187
<p><i>http://xml.org/sax/features/namespace-prefixes</i></p>
 
188
</td>
 
189
<td>
 
190
<p>false</p>
 
191
</td>
 
192
<td>
 
193
<p>If enabled, the original prefixed names and attributes used for
 
194
namespace declarations are reported.</p>
 
195
</td>
 
196
</tr>
 
197
<tr class="odd topAlign">
 
198
<td>
 
199
<p>
 
200
<i>http://trolltech.com/xml/features/report-whitespace-only-CharData</i></p>
 
201
</td>
 
202
<td>
 
203
<p>true</p>
 
204
</td>
 
205
<td>
 
206
<p>If enabled, CharData that consist of only whitespace characters
 
207
are reported using <a href="qxmlcontenthandler.html#characters">QXmlContentHandler.characters</a>().
 
208
If disabled, whitespace is silently discarded.</p>
 
209
</td>
 
210
</tr>
 
211
<tr class="even topAlign">
 
212
<td>
 
213
<p>
 
214
<i>http://trolltech.com/xml/features/report-start-end-entity</i></p>
 
215
</td>
 
216
<td>
 
217
<p>false</p>
 
218
</td>
 
219
<td>
 
220
<p>If enabled, the parser reports QXmlContentHandler.startEntity()
 
221
and QXmlContentHandler.endEntity() events, so character data might
 
222
be reported in chunks. If disabled, the parser does not report
 
223
these events, but silently substitutes the entities, and reports
 
224
the character data in one chunk.</p>
 
225
</td>
 
226
</tr>
 
227
</table>
 
228
<p>See also <a href="qxmlsimplereader.html#feature">feature</a>(),
 
229
<a href="qxmlsimplereader.html#hasFeature">hasFeature</a>(), and
 
230
<a href="xml-sax.html#sax2-features">SAX2 Features</a>.</p>
 
231
 
 
232
 
96
233
<h3 class="fn"><a name="setLexicalHandler" />QXmlSimpleReader.setLexicalHandler (<i>self</i>, <a href="qxmllexicalhandler.html">QXmlLexicalHandler</a>)</h3><p>Reimplemented from <a href="qxmlreader.html#setLexicalHandler">QXmlReader.setLexicalHandler</a>().</p>
97
234
<p>See also <a href="qxmlsimplereader.html#lexicalHandler">lexicalHandler</a>().</p>
98
 
<a name="//apple_ref/cpp/instm/QXmlSimpleReader/setProperty" />
 
235
 
 
236
 
99
237
<h3 class="fn"><a name="setProperty" />QXmlSimpleReader.setProperty (<i>self</i>, QString, sip.voidptr)</h3><p>Reimplemented from <a href="qxmlreader.html#setProperty">QXmlReader.setProperty</a>().</p>
100
238
<p>See also <a href="qxmlsimplereader.html#property">property</a>().</p>
101
 
<p /><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.7.7 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.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.6.3</td></tr></table></div></address></body></html>
 
 
b'\\ No newline at end of file'
 
239
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.8.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.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.7.0</td></tr></table></div></address></body></html>
 
 
b'\\ No newline at end of file'