|
Unicorn XML Toolkit Version 1.50.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |
class CEntityResolver: virtual public CInterface { public: CEntityResolver(); virtual ~CEntityResolver(); public: virtual XInputSource ResolveEntity( const WCHAR *pszPublicId, const WCHAR *pszSystemId) = 0; }; typedef XInterface<CEntityResolver> XEntityResolver;
The basic interface for resolving entities.
If a SAX application needs to implement customized handling
for external entities, it must implement this interface and
register an instance with the SAX reader using the
CXmlReader::SetEntityResolver
method.
The XML reader will then allow the application to intercept any external entities (including the external DTD subset and external parameter entities, if any) before including them.
Many SAX applications will not need to implement this interface, but it will be especially useful for applications that build XML documents from databases or other specialised input sources, or for applications that use URI types other than URLs.
The application can also use this interface to redirect system identifiers to local URIs or to look up replacements in a catalog (possibly by using the public identifier).
CInputSource
Constructor/Destructor Summary | |
CEntityResolver
();
����������Constructs the entity resolver. |
|
~CEntityResolver
();
����������Destroys the entity resolver. |
Function Summary | |
XInputSource
|
ResolveEntity
(const WCHAR *pszPublicId, const WCHAR *pszSystemId);
����������Allows the application to resolve external entities. |
Constructor/Destructor Detail |
CEntityResolver();
Constructs the entity resolver.
virtual ~CEntityResolver();
Destroys the entity resolver.
Function Detail |
virtual XInputSource ResolveEntity( const WCHAR *pszPublicId, const WCHAR *pszSystemId) = 0;
Allows the application to resolve external entities.
The reader will call this method before opening any external entity except the top-level document entity (including the external DTD subset, external entities referenced within the DTD, and external entities referenced within the document element): the application may request that the reader resolve the entity itself, that it use an alternative URI, or that it use an entirely different input source.
Application writers can use this method to redirect external system identifiers to secure and/or local URIs, to look up public identifiers in a catalogue, or to read an entity from a database or other input source (including, for example, a dialog box).
If the system identifier is a URL, the SAX reader must resolve it fully before reporting it to the application.
pszPublicId
- the public identifier of the external entity
being referenced, or the empty string if none was suppliedpszSystemId
- the system identifier of the external entity
being referencedNULL
to request that the reader open a regular
URI connection to the system identifier
|
Unicorn XML Toolkit Version 1.50.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |