putEntityResolver Method (C/C++)

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - SAX2 Reference

putEntityResolver Method (C/C++)

Allows an application to register an EntityResolver. If the application does not register an EntityResolver, the reader performs its own default resolution. An application can register a new or different EntityResolver while in the middle of parsing a document, and the reader will immediately start using the new EntityResolver.

The ISAXEntityResolver interface provides a way to resolve references to external entities (data held in separate files identified by a system or public identifier). The reader automatically resolves internal entities, character references, and predefined entities. However, some applications build XML documents from databases and specialized input sources that use Uniform Resource Identifier (URI) types rather than URLs. When external entities cannot be found by URL, a SAX application should provide a class that implements the EntityResolver interface.

Syntax

HRESULT putEntityResolver(
   [in] ISAXEntityResolver * pResolver);

Parameters

pResolver [in]
The EntityResolver to register.

Return Values

E_FAIL
The value returned if the application fails to set the EntityResolver property.

See Also

getEntityResolver Method (C/C++) | ISAXEntityResolver Interface

Applies to: ISAXXMLReader Interface