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

resolveEntity Method

Allows the parser to resolve external entities.

[Visual Basic]

Implementation Syntax

Function resolveEntity(strPublicId As String, strSystemId As String)

Parameters

strPublicId
The public identifier of the external entity being referenced, or Null (if none was supplied).
strSystemId
The system identifier of the external entity being referenced.
[C/C++]

Syntax

HRESULT resolveEntity(
   [in] const wchar_t * pwchPublicId,
   [in] const wchar_t * pwchSystemId,
   [out,retval] VARIANT * pvarInput);

Parameters

pwchPublicId [in]
The public identifier of the external entity being referenced, or Null (if none was supplied).
pwchSystemId [in]
The system identifier of the external entity being referenced.
pvarInput [out, retval]
The returned text of the entity. Acceptable input types are the same as for the parse method.

Return Values

S_OK
The value returned if no errors are reported.
E_FAIL
The value returned if the parse operation should be aborted.

Remarks

Allow the application to resolve external entities.

When ISAXEntityResolver or IVBSAXEntityResolver is implemented, the SAX reader will call this method before opening any external entity except the top-level document entity. External entities handled by this method can include the following: the external DTD subset, external entities referenced within the DTD, and external entities referenced within the document element. The application can request that the parser resolve the entity itself, that it use an alternative URI, or that it use an entirely different input source.

Application writers can use the resolveEntity method to perform the following tasks:

If the system identifier is a URL, the SAX reader must resolve it fully before reporting it to the application.

Note   For this method, the Java implementation requires the InputSource interface, which is not included in this implementation. Instead, variant is used as the data type for method output. Output currently can represent be either a binary stream (IStream) or, potentially, string data. User feedback is appreciated during prerelease. If important usage cases are found, InputSource might be included in future releases.

To view reference information for Visual Basic or C/C++ only, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

parse Method | unparsedEntityDecl Method

Applies to: ISAXEntityResolver Interface

Other Resources Other Resources

XML Industry Portal