<?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>QXmlErrorHandler 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">  </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QXmlErrorHandler Class Reference<br /><sup><sup>[<a href="qtxml.html">QtXml</a> module]</sup></sup></h1><p>The QXmlErrorHandler class provides an interface to report errors in XML data. <a href="#details">More...</a></p> <p>Inherited by <a href="qxmldefaulthandler.html">QXmlDefaultHandler</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qxmlerrorhandler.html#QXmlErrorHandler">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qxmlerrorhandler.html#QXmlErrorHandler-2">__init__</a></b> (<i>self</i>, QXmlErrorHandler)</li><li><div class="fn" />bool <b><a href="qxmlerrorhandler.html#error">error</a></b> (<i>self</i>, QXmlParseException <i>exception</i>)</li><li><div class="fn" />QString <b><a href="qxmlerrorhandler.html#errorString">errorString</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qxmlerrorhandler.html#fatalError">fatalError</a></b> (<i>self</i>, QXmlParseException <i>exception</i>)</li><li><div class="fn" />bool <b><a href="qxmlerrorhandler.html#warning">warning</a></b> (<i>self</i>, QXmlParseException <i>exception</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QXmlErrorHandler class provides an interface to report errors in XML data.</p> <p>If you want your application to report errors to the user or to perform customized error handling, you should subclass this class.</p> <p>You can set the error handler with <a href="qxmlreader.html#setErrorHandler">QXmlReader.setErrorHandler</a>().</p> <p>Errors can be reported using <a href="qxmlerrorhandler.html#warning">warning</a>(), <a href="qxmlerrorhandler.html#error">error</a>() and <a href="qxmlerrorhandler.html#fatalError">fatalError</a>(), with the error text being reported with <a href="qxmlerrorhandler.html#errorString">errorString</a>().</p> <hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QXmlErrorHandler" />QXmlErrorHandler.__init__ (<i>self</i>)</h3><h3 class="fn"><a name="QXmlErrorHandler-2" />QXmlErrorHandler.__init__ (<i>self</i>, <a href="qxmlerrorhandler.html">QXmlErrorHandler</a>)</h3><h3 class="fn"><a name="error" />bool QXmlErrorHandler.error (<i>self</i>, <a href="qxmlparseexception.html">QXmlParseException</a> <i>exception</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>A reader might use this function to report a recoverable error. A recoverable error corresponds to the definiton of "error" in section 1.2 of the XML 1.0 specification. Details of the error are stored in <i>exception</i>.</p> <p>The reader must continue to provide normal parsing events after invoking this function.</p> <p>If this function returns false the reader stops parsing and reports an error. The reader uses the function <a href="qxmlerrorhandler.html#errorString">errorString</a>() to get the error message.</p> <h3 class="fn"><a name="errorString" />QString QXmlErrorHandler.errorString (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>The reader calls this function to get an error string if any of the handler functions returns false.</p> <h3 class="fn"><a name="fatalError" />bool QXmlErrorHandler.fatalError (<i>self</i>, <a href="qxmlparseexception.html">QXmlParseException</a> <i>exception</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>A reader must use this function to report a non-recoverable error. Details of the error are stored in <i>exception</i>.</p> <p>If this function returns true the reader might try to go on parsing and reporting further errors, but no regular parsing events are reported.</p> <h3 class="fn"><a name="warning" />bool QXmlErrorHandler.warning (<i>self</i>, <a href="qxmlparseexception.html">QXmlParseException</a> <i>exception</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>A reader might use this function to report a warning. Warnings are conditions that are not errors or fatal errors as defined by the XML 1.0 specification. Details of the warning are stored in <i>exception</i>.</p> <p>If this function returns false the reader stops parsing and reports an error. The reader uses the function <a href="qxmlerrorhandler.html#errorString">errorString</a>() to get the error message.</p> <address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.10.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt 4.8.5</td></tr></table></div></address></body></html>