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)
frmMain.rtfOutput.Text = frmMain.rtfOutput.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), only the fatalError method is called for IVBSAXErrorHandler.
Sample XML File (books.xml) | Overview of the JumpStart Application | Implementing the ContentHandler | Implementing the DTDHandler | Creating the Main Form
| This HTML Help has been published using the chm2web software. |