Share via


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.

Visual Basic Implementation Syntax

Sub endDocument
()  

Visual Basic 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

C/C++ 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.

Versioning

Implemented in: MSXML 3.0 and later

Applies to

ISAXContentHandler Interface

See Also

startDocument Method