Partager via


ISAXContentHandler::endPrefixMapping Method (Compact 2013)

3/26/2014

This method ends the scope of the prefix-URI name space mapping. This event always occurs after the corresponding endElement event, but the order of the endPrefixMapping events is not otherwise guaranteed.

Syntax

HRESULT endPrefixMapping(
  const wchar_t* pwchPrefix,
  int cchPrefix
);

Parameters

  • pwchPrefix
    [in] Pointer to the prefix being mapped.
  • cchPrefix
    [in] Length of the prefix string.

Return Value

  • S_OK
    Returned if no errors occur.
  • E_FAIL
    Returned if the parse operation should be aborted.

Remarks

The information from this event is not necessary for typical name space processing. The reader automatically replaces prefixes for element and attribute names when the "http://xml.org/sax/features/namespaces" feature is True (the default).

There are cases, however, when applications need to use prefixes in character data or in attribute values, where they cannot safely be expanded automatically. In those contexts, the startPrefixMapping and endPrefixMapping methods can supply the information needed to expand prefixes.

Note that 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 guaranteed.

Requirements

Header

msxml2.h,
msxml2.idl

Library

uuid.lib

See Also

Reference

ISAXContentHandler
ISAXContentHandler::endElement Method
ISAXContentHandler::startElement Method
ISAXContentHandler::startPrefixMapping Method