classIBXMLCALL EntityResolver

Interface for resolving entities

Inheritance:

EntityResolver


Public

[more] Constructors and destructor.
[more] The entity resolver interface.


Documentation

Interface for resolving entities.

The EntityResolver interface is implemented by clients to provide customizable handling of entity resolution during XML parsing. An implementation of this interface should be registered with the parser using the setEntityResolver() method of the parser object. The parser will then allow the application to intercept any external entities (both resolution of external DTD subsets and all external parameter entities except the top-level document entity itself) before including them.

When a conforming parser encounters an unresolved entity reference in the XML document, it will invoke the EntityResolver to obtain an InputSource containing the resolved entity.

The class HandlerBase implements the default behaviour, which is to return null to request that the parser use the default system identifier.

o Constructors and destructor.

o EntityResolver()
Default constructor.

ovirtual ~EntityResolver()
Destructor.

o The entity resolver interface.

oInputSource* resolveEntity(const ibxmlchar* publicId, const ibxmlchar* systemId)
Allow the application to resolve external entities.

The parser will invoke this method to resolve an external entity it has encountered in the XML document.

The client may signal an error by throwing an SAXException, the parser will either stop or continue parsing after the exception.

An IOException occurring while trying to resolve the external entity shall be treated as a fatal error by validating parsers, while non-validating parsers may either ignore the exception or signal it to the invoker of the parser through the error() method of the ErrorHandler class.

Throws:
SAXException
IOException
Returns:
An InputSource object describing the new input source or null to instruct the parser to open a regular URI connection to the system identifier.
Parameters:
publicId - A pointer to a string containing the public identifier of the external entity to be resolved, or null if none was supplied.
systemId - A pointer to a string containing the system identifier of the external entity being resolved. If the system identifier is a URI, it will be fully resolved by the parser before the method is invoked.


Direct child classes:
HandlerBase

Alphabetic index Hierarchy of classes



This page was generated with the help of DOC++.