For the JumpStart application, you create the ErrorHandler by implementing the IVBSAXErrorHandler interface.
To create the ErrorHandlerImpl class
To implement the ErrorHandlerImpl class
Note If you have trouble implementing methods and procedures for theErrorHandlerImplclass, refer back to Implementing the ContentHandler to see how methods and properties were implemented for theContentHandlerImplclass.
The following is the complete code for the ErrorHandlerImpl class of the JumpStart application.
Option Explicit
Implements IVBSAXErrorHandler
Private Sub IVBSAXErrorHandler_fatalError(ByVal lctr As IVBSAXLocator, _
msg As String, _
ByVal errCode As Long)
Form1.Text2.text = Form1.Text2.text & "*** error *** " & msg
End Sub
Private Sub IVBSAXErrorHandler_error(ByVal lctr As IVBSAXLocator, _
msg As String, ByVal errCode As Long)
End Sub
Private Sub IVBSAXErrorHandler_ignorableWarning( _
ByVal oLocator As MSXML2.IVBSAXLocator, _
strErrorMessage As String, _
ByVal nErrorCode As Long)
End Sub
In the preceding code, only the fatalError method contains code for handling events. For this version of Microsoft® XML Core Services (MSXML) 5.0 for Microsoft Office, only the fatalError method is called for IVBSAXErrorHandler.