Partager via


ISAXErrorHandler:IUnknown (Windows CE 5.0)

Send Feedback

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 putErrorHandler 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 Locator 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
error This method receives notification of a recoverable error. It is not called in the current SAX2 implementation.
fatalError This method receives notification of a non-recoverable error.
ignorableWarning This method receives notification of a warning. It is not called in the current SAX2 implementation.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Msxml2.h, Msxml2.idl.
Link Library: Uuid.lib.

See Also

error Method | fatalError Method | ignorableWarning Method | putErrorHandler Method

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.