endPrefixMapping Method
Ends the scope of the prefix-URI namespace mapping. The reader calls this method after the corresponding endElement
method.
Visual Basic Implementation Syntax
Sub endPrefixMapping(strPrefix As String)
Parameters
strPrefix
The prefix being mapped.
Return Values
If failed, the ContentHandler
raises a trappable error.
C/C++ Syntax
HRESULT endPrefixMapping(
[in] const wchar_t * pwchPrefix,
[in] int cchPrefix);
Parameters
pwchPrefix[in]
The prefix being mapped.
cchPrefix[in]
The length of the prefix string.
Return Values
S_OK
The value returned if no errors occur.
E_FAIL
The value returned if the parse operation should be aborted.
Remarks
The information from this event is not necessary for normal namespace processing. The reader automatically replaces prefixes for element and attribute names when the "http://xml.org/sax/features/namespaces"
feature is set to True (the default).
There are cases, however, when applications need to use prefixes in character data or in attribute values and they cannot safely be expanded automatically. In these cases, the startPrefixMapping
and endPrefixMapping
methods can supply the information needed to expand prefixes.
There is no guarantee that the startPrefixMapping
and endPrefixMapping
events are properly nested relative to each other. All startPrefixMapping
events occur before the corresponding startElement
event, and all endPrefixMapping
events occur after the corresponding endElement
event, but their order is not otherwise guaranteed.
Versioning
Implemented in: MSXML 3.0 and later
Applies to
See Also
endElement Method
startElement Method
startPrefixMapping Method