Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 1315

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QXmlReader Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QXmlReader Class Reference<br /><sup><sup>[<a href="qtxml.html">QtXml</a> module]</sup></sup></h1><p>The QXmlReader class provides an interface for XML readers (i.e.
parsers). <a href="#details">More...</a></p>

<p>Inherited by <a href="qxmlsimplereader.html">QXmlSimpleReader</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qxmlreader.html#QXmlReader">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qxmlreader.html#QXmlReader-2">__init__</a></b> (<i>self</i>, QXmlReader)</li><li><div class="fn" />QXmlContentHandler <b><a href="qxmlreader.html#contentHandler">contentHandler</a></b> (<i>self</i>)</li><li><div class="fn" />QXmlDeclHandler <b><a href="qxmlreader.html#declHandler">declHandler</a></b> (<i>self</i>)</li><li><div class="fn" />QXmlDTDHandler <b><a href="qxmlreader.html#DTDHandler">DTDHandler</a></b> (<i>self</i>)</li><li><div class="fn" />QXmlEntityResolver <b><a href="qxmlreader.html#entityResolver">entityResolver</a></b> (<i>self</i>)</li><li><div class="fn" />QXmlErrorHandler <b><a href="qxmlreader.html#errorHandler">errorHandler</a></b> (<i>self</i>)</li><li><div class="fn" />(bool, bool&#160;<i>ok</i>) <b><a href="qxmlreader.html#feature">feature</a></b> (<i>self</i>, QString&#160;<i>name</i>)</li><li><div class="fn" />bool <b><a href="qxmlreader.html#hasFeature">hasFeature</a></b> (<i>self</i>, QString&#160;<i>name</i>)</li><li><div class="fn" />bool <b><a href="qxmlreader.html#hasProperty">hasProperty</a></b> (<i>self</i>, QString&#160;<i>name</i>)</li><li><div class="fn" />QXmlLexicalHandler <b><a href="qxmlreader.html#lexicalHandler">lexicalHandler</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qxmlreader.html#parse">parse</a></b> (<i>self</i>, QXmlInputSource&#160;<i>input</i>)</li><li><div class="fn" />bool <b><a href="qxmlreader.html#parse-2">parse</a></b> (<i>self</i>, QXmlInputSource&#160;<i>input</i>)</li><li><div class="fn" />(sip.voidptr, bool&#160;<i>ok</i>) <b><a href="qxmlreader.html#property">property</a></b> (<i>self</i>, QString&#160;<i>name</i>)</li><li><div class="fn" /><b><a href="qxmlreader.html#setContentHandler">setContentHandler</a></b> (<i>self</i>, QXmlContentHandler&#160;<i>handler</i>)</li><li><div class="fn" /><b><a href="qxmlreader.html#setDeclHandler">setDeclHandler</a></b> (<i>self</i>, QXmlDeclHandler&#160;<i>handler</i>)</li><li><div class="fn" /><b><a href="qxmlreader.html#setDTDHandler">setDTDHandler</a></b> (<i>self</i>, QXmlDTDHandler&#160;<i>handler</i>)</li><li><div class="fn" /><b><a href="qxmlreader.html#setEntityResolver">setEntityResolver</a></b> (<i>self</i>, QXmlEntityResolver&#160;<i>handler</i>)</li><li><div class="fn" /><b><a href="qxmlreader.html#setErrorHandler">setErrorHandler</a></b> (<i>self</i>, QXmlErrorHandler&#160;<i>handler</i>)</li><li><div class="fn" /><b><a href="qxmlreader.html#setFeature">setFeature</a></b> (<i>self</i>, QString&#160;<i>name</i>, bool&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qxmlreader.html#setLexicalHandler">setLexicalHandler</a></b> (<i>self</i>, QXmlLexicalHandler&#160;<i>handler</i>)</li><li><div class="fn" /><b><a href="qxmlreader.html#setProperty">setProperty</a></b> (<i>self</i>, QString&#160;<i>name</i>, sip.voidptr&#160;<i>value</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QXmlReader class provides an interface for XML readers (i.e.
parsers).</p>
<p>This abstract class provides an interface for all of Qt's XML
readers. Currently there is only one implementation of a reader
included in Qt's XML module: <a href="qxmlsimplereader.html">QXmlSimpleReader</a>. In future releases
there might be more readers with different properties available
(e.g. a validating parser).</p>
<p>The design of the XML classes follows the <a href="http://www.saxproject.org/">SAX2 Java interface</a>, with the
names adapted to fit Qt naming conventions. It should be very easy
for anybody who has worked with SAX2 to get started with the Qt XML
classes.</p>
<p>All readers use the class <a href="qxmlinputsource.html">QXmlInputSource</a> to read the input
document. Since you are normally interested in particular content
in the XML document, the reader reports the content through special
handler classes (<a href="qxmldtdhandler.html">QXmlDTDHandler</a>,
<a href="qxmldeclhandler.html">QXmlDeclHandler</a>, <a href="qxmlcontenthandler.html">QXmlContentHandler</a>, <a href="qxmlentityresolver.html">QXmlEntityResolver</a>, <a href="qxmlerrorhandler.html">QXmlErrorHandler</a> and <a href="qxmllexicalhandler.html">QXmlLexicalHandler</a>), which you must
subclass, if you want to process the contents.</p>
<p>Since the handler classes only describe interfaces you must
implement all the functions. We provide the <a href="qxmldefaulthandler.html">QXmlDefaultHandler</a> class to make this
easier: it implements a default behavior (do nothing) for all
functions, so you can subclass it and just implement the functions
you are interested in.</p>
<p>Features and properties of the reader can be set with <a href="qxmlreader.html#setFeature">setFeature</a>() and <a href="qxmlreader.html#setProperty">setProperty</a>() respectively. You
can set the reader to use your own subclasses with <a href="qxmlreader.html#setEntityResolver">setEntityResolver</a>(),
<a href="qxmlreader.html#setDTDHandler">setDTDHandler</a>(),
<a href="qxmlreader.html#setContentHandler">setContentHandler</a>(),
<a href="qxmlreader.html#setErrorHandler">setErrorHandler</a>(),
<a href="qxmlreader.html#setLexicalHandler">setLexicalHandler</a>()
and <a href="qxmlreader.html#setDeclHandler">setDeclHandler</a>().
The parse itself is started with a call to <a href="qxmlreader.html#parse">parse</a>().</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QXmlReader" />QXmlReader.__init__ (<i>self</i>)</h3><h3 class="fn"><a name="QXmlReader-2" />QXmlReader.__init__ (<i>self</i>, <a href="qxmlreader.html">QXmlReader</a>)</h3><h3 class="fn"><a name="contentHandler" /><a href="qxmlcontenthandler.html">QXmlContentHandler</a> QXmlReader.contentHandler (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the content handler or 0 if none was set.</p>
<p><b>See also</b> <a href="qxmlreader.html#setContentHandler">setContentHandler</a>().</p>


<h3 class="fn"><a name="declHandler" /><a href="qxmldeclhandler.html">QXmlDeclHandler</a> QXmlReader.declHandler (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the declaration handler or 0 if none was set.</p>
<p><b>See also</b> <a href="qxmlreader.html#setDeclHandler">setDeclHandler</a>().</p>


<h3 class="fn"><a name="DTDHandler" /><a href="qxmldtdhandler.html">QXmlDTDHandler</a> QXmlReader.DTDHandler (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the DTD handler or 0 if none was set.</p>
<p><b>See also</b> <a href="qxmlreader.html#setDTDHandler">setDTDHandler</a>().</p>


<h3 class="fn"><a name="entityResolver" /><a href="qxmlentityresolver.html">QXmlEntityResolver</a> QXmlReader.entityResolver (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the entity resolver or 0 if none was set.</p>
<p><b>See also</b> <a href="qxmlreader.html#setEntityResolver">setEntityResolver</a>().</p>


<h3 class="fn"><a name="errorHandler" /><a href="qxmlerrorhandler.html">QXmlErrorHandler</a> QXmlReader.errorHandler (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the error handler or 0 if none is set.</p>
<p><b>See also</b> <a href="qxmlreader.html#setErrorHandler">setErrorHandler</a>().</p>


<h3 class="fn"><a name="feature" />(bool, bool&#160;<i>ok</i>) QXmlReader.feature (<i>self</i>, QString&#160;<i>name</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>If the reader has the feature called <i>name</i>, the feature's
value is returned. If no such feature exists the return value is
undefined.</p>
<p>If <i>ok</i> is not 0: <tt>*</tt><i>ok</i> is set to true if the
reader has the feature called <i>name</i>; otherwise
<tt>*</tt><i>ok</i> is set to false.</p>
<p><b>See also</b> <a href="qxmlreader.html#setFeature">setFeature</a>() and <a href="qxmlreader.html#hasFeature">hasFeature</a>().</p>


<h3 class="fn"><a name="hasFeature" />bool QXmlReader.hasFeature (<i>self</i>, QString&#160;<i>name</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns <tt>true</tt> if the reader has the feature called
<i>name</i>; otherwise returns false.</p>
<p><b>See also</b> <a href="qxmlreader.html#feature">feature</a>()
and <a href="qxmlreader.html#setFeature">setFeature</a>().</p>


<h3 class="fn"><a name="hasProperty" />bool QXmlReader.hasProperty (<i>self</i>, QString&#160;<i>name</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns true if the reader has the property <i>name</i>;
otherwise returns false.</p>
<p><b>See also</b> <a href="qxmlreader.html#property">property</a>() and <a href="qxmlreader.html#setProperty">setProperty</a>().</p>


<h3 class="fn"><a name="lexicalHandler" /><a href="qxmllexicalhandler.html">QXmlLexicalHandler</a> QXmlReader.lexicalHandler (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the lexical handler or 0 if none was set.</p>
<p><b>See also</b> <a href="qxmlreader.html#setLexicalHandler">setLexicalHandler</a>().</p>


<h3 class="fn"><a name="parse" />bool QXmlReader.parse (<i>self</i>, <a href="qxmlinputsource.html">QXmlInputSource</a>&#160;<i>input</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Reads an XML document from <i>input</i> and parses it. Returns
true if the parsing was successful; otherwise returns false.</p>


<h3 class="fn"><a name="parse-2" />bool QXmlReader.parse (<i>self</i>, <a href="qxmlinputsource.html">QXmlInputSource</a>&#160;<i>input</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><h3 class="fn"><a name="property" />(sip.voidptr, bool&#160;<i>ok</i>) QXmlReader.property (<i>self</i>, QString&#160;<i>name</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>If the reader has the property <i>name</i>, this function
returns the value of the property; otherwise the return value is
undefined.</p>
<p>If <i>ok</i> is not 0: if the reader has the <i>name</i>
property <tt>*</tt><i>ok</i> is set to true; otherwise
<tt>*</tt><i>ok</i> is set to false.</p>
<p><b>See also</b> <a href="qxmlreader.html#setProperty">setProperty</a>() and <a href="qxmlreader.html#hasProperty">hasProperty</a>().</p>


<h3 class="fn"><a name="setContentHandler" />QXmlReader.setContentHandler (<i>self</i>, <a href="qxmlcontenthandler.html">QXmlContentHandler</a>&#160;<i>handler</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Sets the content handler to <i>handler</i>.</p>
<p><b>See also</b> <a href="qxmlreader.html#contentHandler">contentHandler</a>().</p>


<h3 class="fn"><a name="setDeclHandler" />QXmlReader.setDeclHandler (<i>self</i>, <a href="qxmldeclhandler.html">QXmlDeclHandler</a>&#160;<i>handler</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Sets the declaration handler to <i>handler</i>.</p>
<p><b>See also</b> <a href="qxmlreader.html#declHandler">declHandler</a>().</p>


<h3 class="fn"><a name="setDTDHandler" />QXmlReader.setDTDHandler (<i>self</i>, <a href="qxmldtdhandler.html">QXmlDTDHandler</a>&#160;<i>handler</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Sets the DTD handler to <i>handler</i>.</p>
<p><b>See also</b> <a href="qxmlreader.html#DTDHandler">DTDHandler</a>().</p>


<h3 class="fn"><a name="setEntityResolver" />QXmlReader.setEntityResolver (<i>self</i>, <a href="qxmlentityresolver.html">QXmlEntityResolver</a>&#160;<i>handler</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Sets the entity resolver to <i>handler</i>.</p>
<p><b>See also</b> <a href="qxmlreader.html#entityResolver">entityResolver</a>().</p>


<h3 class="fn"><a name="setErrorHandler" />QXmlReader.setErrorHandler (<i>self</i>, <a href="qxmlerrorhandler.html">QXmlErrorHandler</a>&#160;<i>handler</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Sets the error handler to <i>handler</i>. Clears the error
handler if <i>handler</i> is 0.</p>
<p><b>See also</b> <a href="qxmlreader.html#errorHandler">errorHandler</a>().</p>


<h3 class="fn"><a name="setFeature" />QXmlReader.setFeature (<i>self</i>, QString&#160;<i>name</i>, bool&#160;<i>value</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Sets the feature called <i>name</i> to the given <i>value</i>.
If the reader doesn't have the feature nothing happens.</p>
<p><b>See also</b> <a href="qxmlreader.html#feature">feature</a>()
and <a href="qxmlreader.html#hasFeature">hasFeature</a>().</p>


<h3 class="fn"><a name="setLexicalHandler" />QXmlReader.setLexicalHandler (<i>self</i>, <a href="qxmllexicalhandler.html">QXmlLexicalHandler</a>&#160;<i>handler</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Sets the lexical handler to <i>handler</i>.</p>
<p><b>See also</b> <a href="qxmlreader.html#lexicalHandler">lexicalHandler</a>().</p>


<h3 class="fn"><a name="setProperty" />QXmlReader.setProperty (<i>self</i>, QString&#160;<i>name</i>, sip.voidptr&#160;<i>value</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Sets the property <i>name</i> to <i>value</i>. If the reader
doesn't have the property nothing happens.</p>
<p><b>See also</b> <a href="qxmlreader.html#property">property</a>() and <a href="qxmlreader.html#hasProperty">hasProperty</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.3 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> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>