endDocument Method
Receives notification of the end of a document. The reader invokes the endDocument
method only once. The endDocument
method is the last method invoked during the parse. The reader does not invoke this method until it has either abandoned parsing upon encountering an unrecoverable error or has reached the end of the document.
Implementation Syntax
Sub endDocument()
Usage Syntax
oContentHandler.endDocument
Return Values
If failed, the ContentHandler
might raise an exception. This can be any Simple API for XML (SAX) exception. The exception might wrap another exception.
Example
The following example uses the endDocument
method to add a line to the current contents of a text box (Text1) on the main application form (Form1). The new text indicates that the reader has finished the document.
Private Sub IVBSAXContentHandler_endDocument() Form1.Text1.Text = Form1.Text1.Text & vbCrLf & "Ending document." End Sub
Syntax
HRESULT endDocument();
Return Values
- S_OK
- The value returned if no errors occur.
- E_FAIL
- The value returned if the parse operation should be aborted.
To view reference information for Visual Basic or C/C++ only, click the Language Filter button in the upper-left corner of the page.
See Also
Applies to: ISAXContentHandler/IVBSAXContentHandler Interface