Interface Summary : IBufferedXMLReader

Interface for reading an XML document using callbacks.
This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY.

XMLReader is the interface that an XML parser's SAX2 driver must implement. This interface allows an application to set and query features and properties in the parser, to register event handlers for document processing, and to initiate a document parse.

All SAX interfaces are assumed to be synchronous: the parse methods must not return until parsing is complete, and readers must wait for an event-handler callback to return before reporting the next event.

This interface replaces the (now deprecated) SAX 1.0 IParser interface. The XMLReader interface contains two important enhancements over the old Parser interface (as well as some minor ones):

  1. it adds a standard way to query and set features and properties; and
  2. it adds Namespace support, which is required for many higher-level XML standards.

There are adapters available to convert a SAX1 Parser to a SAX2 XMLReader and vice-versa.

For reasons of generality and efficiency, strings that are returned from the interface are declared as pointers (PSAXChar) and lengths. This requires that the model use procedural out parameters rather than functions as in the original interfaces.


Since : SAX 2.0
See : IBufferedXMLFilter

Methods

procedure setDTDHandler(IBufferedDTDHandler)
function getDTDHandler() : IBufferedDTDHandler
procedure setContentHandler(IBufferedContentHandler)
function getContentHandler() : IBufferedContentHandler

Properties



procedure setDTDHandler(const handler : IBufferedDTDHandler);

Allow an application to register a DTD event handler.

If the application does not register a DTD handler, all DTD events reported by the SAX parser will be silently ignored.

Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.


Parameter : handler The DTD handler.
See : IBufferedXMLReader.getDTDHandler

Top


function getDTDHandler() : IBufferedDTDHandler;

Return the current DTD handler.
Result : The current DTD handler, or null if none has been registered.
See : IBufferedXMLReader.setDTDHandler

Top


procedure setContentHandler(const handler : IBufferedContentHandler);

Allow an application to register a content event handler.

If the application does not register a content handler, all content events reported by the SAX parser will be silently ignored.

Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.


Parameter : handler The content handler.
See : IBufferedXMLReader.getContentHandler

Top


function getContentHandler() : IBufferedContentHandler;

Return the current content handler.
Result : The current content handler, or nil if none has been registered.
See : IBufferedXMLReader.setContentHandler

Top


ContentHandler

Extension property to get and set the ContentHandler
Result : The current content handler, or nil if none has been registered.
See : IBufferedXMLReader.getContentHandler
See : IBufferedXMLReader.setContentHandler

property ContentHandler: IBufferedContentHandler read getContentHandler write setContentHandler

Top


DTDHandler

Extension property to get and set the DTDHandler
Result : The current DTD handler, or nil if none has been registered.
See : IBufferedXMLReader.getDTDHandler
See : IBufferedXMLReader.setDTDHandler

property DTDHandler: IBufferedDTDHandler read getDTDHandler write setDTDHandler

Top