1
<?xml version="1.0" encoding="iso-8859-1"?>
3
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/xml/qxml.cpp -->
7
<title>Qt 4.0: QXmlErrorHandler Class Reference</title>
8
<style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
9
a:link { color: #004faf; text-decoration: none }
10
a:visited { color: #672967; text-decoration: none }
11
td.postheader { font-family: sans-serif }
12
tr.address { font-family: sans-serif }
13
body { background: #ffffff; color: black; }</style>
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
19
<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="mainclasses.html"><font color="#004faf">Main Classes</font></a> · <a href="annotated.html"><font color="#004faf">Annotated</font></a> · <a href="groups.html"><font color="#004faf">Grouped Classes</font></a> · <a href="functions.html"><font color="#004faf">Functions</font></a></td>
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QXmlErrorHandler Class Reference</h1>
21
<p>The QXmlErrorHandler class provides an interface to report errors in XML data. <a href="#details">More...</a></p>
22
<pre>#include <QXmlErrorHandler></pre><p>Part of the <a href="qtxml.html">QtXml</a> module.</p>
23
<p>Inherited by <a href="qxmldefaulthandler.html">QXmlDefaultHandler</a>.</p>
24
<p><b>Note:</b> All the functions in this class are <a href="threads.html#reentrant">reentrant</a>.</p>
26
<li><a href="qxmlerrorhandler-members.html">List of all members, including inherited members</a></li>
28
<a name="public-functions"></a>
29
<h3>Public Functions</h3>
31
<li><div class="fn"/>virtual <b><a href="qxmlerrorhandler.html#dtor.QXmlErrorHandler">~QXmlErrorHandler</a></b> ()</li>
32
<li><div class="fn"/>virtual bool <b><a href="qxmlerrorhandler.html#error">error</a></b> ( const QXmlParseException & <i>exception</i> ) = 0</li>
33
<li><div class="fn"/>virtual QString <b><a href="qxmlerrorhandler.html#errorString">errorString</a></b> () const = 0</li>
34
<li><div class="fn"/>virtual bool <b><a href="qxmlerrorhandler.html#fatalError">fatalError</a></b> ( const QXmlParseException & <i>exception</i> ) = 0</li>
35
<li><div class="fn"/>virtual bool <b><a href="qxmlerrorhandler.html#warning">warning</a></b> ( const QXmlParseException & <i>exception</i> ) = 0</li>
37
<a name="details"></a>
39
<h2>Detailed Description</h2>
40
<p>The QXmlErrorHandler class provides an interface to report errors in XML data.</p>
41
<p>If you want your application to report errors to the user or to perform customized error handling, you should subclass this class.</p>
42
<p>You can set the error handler with <a href="qxmlreader.html#setErrorHandler">QXmlReader::setErrorHandler</a>().</p>
43
<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>
44
<p>See also the <a href="xml.html#sax2intro">Introduction to SAX2</a>.</p>
45
<p><a href="qxmllexicalhandler.html">QXmlLexicalHandler</a></p>
46
<p>See also <a href="qxmldtdhandler.html">QXmlDTDHandler</a>, <a href="qxmldeclhandler.html">QXmlDeclHandler</a>, <a href="qxmlcontenthandler.html">QXmlContentHandler</a>, and <a href="qxmlentityresolver.html">QXmlEntityResolver</a>.</p>
48
<h2>Member Function Documentation</h2>
49
<h3 class="fn"><a name="dtor.QXmlErrorHandler"></a>QXmlErrorHandler::~QXmlErrorHandler () <tt> [virtual]</tt></h3>
50
<p>Destroys the error handler.</p>
51
<h3 class="fn"><a name="error"></a>bool QXmlErrorHandler::error ( const <a href="qxmlparseexception.html">QXmlParseException</a> & <i>exception</i> ) <tt> [pure virtual]</tt></h3>
52
<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>
53
<p>The reader must continue to provide normal parsing events after invoking this function.</p>
54
<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>
55
<h3 class="fn"><a name="errorString"></a><a href="qstring.html">QString</a> QXmlErrorHandler::errorString () const <tt> [pure virtual]</tt></h3>
56
<p>The reader calls this function to get an error string if any of the handler functions returns false.</p>
57
<h3 class="fn"><a name="fatalError"></a>bool QXmlErrorHandler::fatalError ( const <a href="qxmlparseexception.html">QXmlParseException</a> & <i>exception</i> ) <tt> [pure virtual]</tt></h3>
58
<p>A reader must use this function to report a non-recoverable error. Details of the error are stored in <i>exception</i>.</p>
59
<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>
60
<h3 class="fn"><a name="warning"></a>bool QXmlErrorHandler::warning ( const <a href="qxmlparseexception.html">QXmlParseException</a> & <i>exception</i> ) <tt> [pure virtual]</tt></h3>
61
<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>
62
<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>
63
<p /><address><hr /><div align="center">
64
<table width="100%" cellspacing="0" border="0"><tr class="address">
65
<td width="30%">Copyright © 2005 <a href="trolltech.html">Trolltech</a></td>
66
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
67
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
68
</tr></table></div></address></body>