Receives notification of the end of an element. The reader invokes this method at the end of every element in the XML document.
A corresponding startElement
method is invoked for every endElement
method, even when the element is empty.
Sub endElement(strNamespaceURI As String, strLocalName As_ String, strQName As String)
oContentHandler.endElement "xsl", "stylesheet", "xsl:stylesheet"
If failed, the ContentHandler
raises a trappable error.
The following example uses the endElement
method to set the text property for a text box (Text1) on the main application form (Form1). The new text indicates that the reader has finished reading the current element.
Private Sub IVBSAXContentHandler_endElement(strNamespaceURI As String, _ strLocalName As String, strQName As String) Form1.Text1.Text = Form1.Text1.Text & "End of element: " & _ strQName & vbCrLf End Sub
This method allows up to three names for each element:
Which of these names are specified depends on the values of the "http://xml.org/sax/features/namespaces"
and the "http://xml.org/sax/features/namespace-prefixes"
features. The namespace URI and local name are required when the "http://xml.org/sax/features/namespaces"
feature is True (the default). These values are optional when this feature is set to False.
Note Neither the URI nor the local name value can be specified alone. Both values are required if either is used.
The QName is required when the "http://xml.org/sax/features/namespaces-prefixes feature"
is set to True and is optional when this feature is set to False (the default).
A corresponding startElement
event occurs for every endElement
event, even when the element is empty.
This event allows up to three name components for each element:
Any or all of these name components may be provided, depending on the values of the "http://xml.org/sax/features/namespaces"
and the "http://xml.org/sax/features/namespace-prefixes"
features. The namespace URI and local name are required when the "http://xml.org/sax/features/namespaces"
feature is set to True (the default). These values are optional when this feature is set to False.
Note Neither the URI nor the local name value can be specified alone. Both values are required if either is used.
The QName is required when the "http://xml.org/sax/features/namespaces-prefixes feature"
is set to True and is optional when this feature is set to False (the default).
HRESULT endElement( [in] const wchar_t * pwchNamespaceUri, [in] int cchNamespaceUri, [in] const wchar_t * pwchLocalName, [in] int cchLocalName [in] const wchar_t * pwchQName [in] int cchQName);
To view reference information for Visual Basic or C/C++ only, click the Language Filter button in the upper-left corner of the page.
Applies to: ISAXContentHandler/IVBSAXContentHandler Interface