
We bake cookies in your browser for a better experience. Using this site means that you consent.Read More
TheQXmlErrorHandler class provides an interface to report errors in XML data.More...
| Header: | #include <QXmlErrorHandler> |
| Inherited By: |
Note: All functions in this class arereentrant.
| virtual | ~QXmlErrorHandler() |
| virtual bool | error(const QXmlParseException & exception) = 0 |
| virtual QString | errorString() const = 0 |
| virtual bool | fatalError(const QXmlParseException & exception) = 0 |
| virtual bool | warning(const QXmlParseException & exception) = 0 |
TheQXmlErrorHandler class provides an interface to report errors in XML data.
If you want your application to report errors to the user or to perform customized error handling, you should subclass this class.
You can set the error handler withQXmlReader::setErrorHandler().
Errors can be reported usingwarning(),error() andfatalError(), with the error text being reported witherrorString().
See alsoQXmlDTDHandler,QXmlDeclHandler,QXmlContentHandler,QXmlEntityResolver,QXmlLexicalHandler, andIntroduction to SAX2.
[virtual]QXmlErrorHandler::~QXmlErrorHandler()Destroys the error handler.
[pure virtual]bool QXmlErrorHandler::error(constQXmlParseException & exception)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 inexception.
The reader must continue to provide normal parsing events after invoking this function.
If this function returns false the reader stops parsing and reports an error. The reader uses the functionerrorString() to get the error message.
[pure virtual]QString QXmlErrorHandler::errorString() constThe reader calls this function to get an error string if any of the handler functions returns false.
[pure virtual]bool QXmlErrorHandler::fatalError(constQXmlParseException & exception)A reader must use this function to report a non-recoverable error. Details of the error are stored inexception.
If this function returns true the reader might try to go on parsing and reporting further errors, but no regular parsing events are reported.
[pure virtual]bool QXmlErrorHandler::warning(constQXmlParseException & exception)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 inexception.
If this function returns false the reader stops parsing and reports an error. The reader uses the functionerrorString() to get the error message.
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.