29.5 Parsing with DTDs (cont.)
- Register an error handler to have errors reported
- Handler is a class inherited from DOMErrorHandler
- Override method:
bool handleError(const DOMError& domError)
- Should log error
- Return true if non-fatal
- Sample program defines SimpleErrorHandler
- To install the handler:
DOMErrorHandler* handler = new SimpleErrorHandler();
parser->setErrorHandler(handler);
prev
|top
|next