Share via


ISAXErrorHandler (Windows Embedded CE 6.0)

1/6/2010

The ISAXErrorHandler interface provides the basic interface for handling parsing errors. To implement customized error handling, the application must implement this interface and then register an instance with the Simple API for XML (SAX2) reader using the ISAXXMLReader::putErrorHandler Method method. The reader then reports all errors and warnings through this interface. If an application does not register an error handler, XML parsing errors are unreported and unexpected behavior can occur.

Due to the way exceptions are handled in COM, SAXException and derived classes are not implemented. For this reason the single SAXParserException parameter is replaced with the input parameters shown in the following code sample.

[in] ISAXLocator * pLocator
// The  object, which contains line and column numbers 
// of the error. SystemID and PublicID may be unavailable for 
// particular data sources, such as character buffer.
[in] const wchar_t * pwchErrorMessage
// The property inherited from the class, org.xml.sax.SAXException. 
// In a COM implementation, provides error information.
[in] HRESULT hrErrorCode
// The HRESULT code for the reason of the error.

All these methods can return either S_OK code, or E_FAIL, which means that parsing should be aborted no matter what level.

Currently, all errors are fatal.

Method Description

ISAXErrorHandler::error Method

This method receives notification of a recoverable error. It is not called in the current SAX2 implementation.

ISAXErrorHandler::fatalError Method

This method receives notification of a non-recoverable error.

ISAXErrorHandler::ignorableWarning Method

This method receives notification of a warning. It is not called in the current SAX2 implementation.

Requirements

Header msxml2.h, msxml2.idl
Library uuid.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

XML SAX Interfaces