Compartir a través de


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 Value

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

Versioning

Implemented in: MSXML 3.0 and later

Applies to

ISAXXMLReader Interface

See Also

getEntityResolver Method (C-C++)
ISAXEntityResolver Interface