Share via


ISAXContentHandler::startPrefixMapping Method (Windows CE 5.0)

Send Feedback

This method begins the scope of the prefix-URI namespace mapping. This method is always invoked after the corresponding endElement event, but the order of the endPrefixMapping events is not otherwise guaranteed.

HRESULT startPrefixMapping(const wchar_t* pwchPrefix,int cchPrefix,const wchar_t* pwchUri,intcchUri);

Parameters

  • pwchPrefix
    [in] Pointer to the prefix being mapped.
  • cchPrefix
    [in] Length of the prefix string or –1 (if zero-terminated).
  • pwchUri
    [in] Pointer to the name space URI to which the prefix is mapped.
  • cchUri
    [in] Length of the name space URI string.

Return Values

  • 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 events 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

OS Versions: Windows CE .NET 4.0 and later.
Header: Msxml2.h, Msxml2.idl.
Link Library: Uuid.lib.

See Also

endElement | endPrefixMapping Method | startElement | ISAXContentHandler:IUnknown Interface

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.