Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This method begins the scope of the prefix-URI namespace mapping. This method is always invoked after the corresponding endElementevent, but the order of the endPrefixMappingevents is not otherwise guaranteed.

Syntax

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

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 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 startPrefixMappingand endPrefixMappingevents can supply the information needed to expand prefixes.

Note that there is no guarantee that the startPrefixMappingand endPrefixMappingevents are properly nested relative to each other. All startPrefixMappingevents occur before the corresponding startElementevent and all endPrefixMappingevents occur after the corresponding endElementevent, but their order is not guaranteed.

Requirements

Header msxml2.h, msxml2.idl
Library uuid.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also