Xerces-C++: XMLEntityHandler Class Reference

| API Docs for SAX and DOM |
| Main Page Classes Files Related Pages Alphabetical List Class List Class Hierarchy Class Members # XMLEntityHandler Class Reference This abstract class is a callback mechanism for the scanner. More... Inheritance diagram for XMLEntityHandler: [legend] List of all members.
## Public Member Functions
Destructor
virtual | ~XMLEntityHandler ()
| Default destructor.
The pure virtual methods in this interface.
virtual void | endInputSource (const InputSource &inputSource)=0
| This method get called after the scanner has finished reading from the given input source while processing external entity references.
virtual bool | expandSystemId (const XMLCh *const systemId, XMLBuffer &toFill)=0
| This method allows the passes the scanned systemId to the entity handler, thereby giving it a chance to provide any customized handling like resolving relative path names.
virtual void | resetEntities ()=0
| This method allows the entity handler to reset itself, so that it can be used again.
virtual InputSource * | resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId, const XMLCh *const baseURI=0)=0
| This method allows the entity handler to provide customized application specific entity resolution.
virtual InputSource * | resolveEntity (XMLResourceIdentifier *resourceIdentifier)=0
| This method allows the entity handler to provide customized application specific entity resolution.
virtual void | startInputSource (const InputSource &inputSource)=0
| This method will be called before the scanner starts reading from an input source while processing external entity references.
## Protected Member Functions
Constructor
| XMLEntityHandler ()
| Protected default constructor.
## Detailed Description This abstract class is a callback mechanism for the scanner. By creating a derivative of this class and plugging into the scanner, the scanner will call back on the object's methods to entity events. This class is primarily for use by those writing their own parser classes. If you use the standard parser classes, DOMParser and SAXParser, you won't use this API. You will instead use a similar mechanism defined by the SAX API, called EntityResolver. ## Constructor & Destructor Documentation
virtual XMLEntityHandler::~XMLEntityHandler | ( |  | ) | `[virtual]`
Default destructor.
XMLEntityHandler::XMLEntityHandler | ( |  | ) | `[protected]`
Protected default constructor. ## Member Function Documentation
virtual void XMLEntityHandler::endInputSource | ( | const InputSource & | inputSource | ) | `[pure virtual]`
  This method get called after the scanner has finished reading from the given input source while processing external entity references. Parameters:
  | inputSource | The input source for the entity
Implemented in SAXParser, and XercesDOMParser.
virtual bool XMLEntityHandler::expandSystemId | ( | const XMLCh *const | systemId,
|  | XMLBuffer & | toFill |
| ) |  |  | `[pure virtual]`
  This method allows the passes the scanned systemId to the entity handler, thereby giving it a chance to provide any customized handling like resolving relative path names. The scanner first calls this method before calling `resolveEntity`. Parameters:
  | systemId | The system id extracted by the scanner from the input source.
  | toFill | The buffer in which the fully expanded system id needs to be stored.
Implemented in SAXParser, and XercesDOMParser.
virtual void XMLEntityHandler::resetEntities | ( |  | ) | `[pure virtual]`
This method allows the entity handler to reset itself, so that it can be used again. It is called prior to a new document parse operation. Implemented in SAXParser, and XercesDOMParser.
virtual InputSource* XMLEntityHandler::resolveEntity | ( | const XMLCh *const | publicId,
|  | const XMLCh *const | systemId,
|  | const XMLCh *const | baseURI = `0` |
| ) |  |  | `[pure virtual]`
  This method allows the entity handler to provide customized application specific entity resolution. This method is defined by SAX 1.0 API. Only one resolveEntity method will be used. If both setEntityResolver and setXMLEntityResolver are called, then the last one is used. Parameters:
  | publicId | A const pointer to a Unicode string representing the public id of the entity just parsed.
  | systemId | A const pointer to a Unicode string representing the system id of the entity just parsed.
  | baseURI | A const pointer to a Unicode string representing the base URI of the entity just parsed, or `null` if there is no base URI.
Returns: The value returned by the SAX resolveEntity method or NULL otherwise to indicate no processing was done. The returned InputSource is owned by the parser which is responsible to clean up the memory. Implemented in SAXParser, and XercesDOMParser.
virtual InputSource* XMLEntityHandler::resolveEntity | ( | XMLResourceIdentifier * | resourceIdentifier | ) | `[pure virtual]`
  This method allows the entity handler to provide customized application specific entity resolution. Only one resolveEntity method will be used. If both setEntityResolver and setXMLEntityResolver are called, then the last one is used. Parameters:
  | resourceIdentifier | An object containing the type of resource to be resolved and the associated data members corresponding to this type.
Returns: The value returned by the resolveEntity method or NULL otherwise to indicate no processing was done. The returned InputSource is owned by the parser which is responsible to clean up the memory. Implemented in SAXParser, and XercesDOMParser.
virtual void XMLEntityHandler::startInputSource | ( | const InputSource & | inputSource | ) | `[pure virtual]`
  This method will be called before the scanner starts reading from an input source while processing external entity references. Parameters:
  | inputSource | The external input source.
Implemented in SAXParser, and XercesDOMParser. The documentation for this class was generated from the following file: XMLEntityHandler.hpp

Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved.