Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

qgxml::XMLReader Class Reference
[XML SAX Module]

#include <qgarlib/sax/XMLReader.H>

Inheritance diagram for qgxml::XMLReader:

qgxml::QtXMLReaderAdaptor qgxml::XercesXMLReaderAdaptor List of all members.

Detailed Description

Interface for reading an XML document using callbacks.

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.

This class is an adaptation for C++ of the interface of the same name implemented in the Java SAX API(http://www.saxproject.org).

Author:
Jan Rendek (Adaptation)
Date:
March 3, 2003 15:40
Since:
Qgar 2.1.1

Definition at line 76 of file XMLReader.H.

Public Member Functions

virtual void parse (InputSource &input)=0
 Parse an XML document.
virtual void parse (const std::string &systemId)=0
 Parse an XML document from a system identifier (URI).
Destructor
virtual ~XMLReader ()
 Destructor.
Access
virtual ContentHandlergetContentHandler () const =0
 Return the current content handler.
virtual DTDHandlergetDTDHandler () const =0
 Return the current DTD handler.
virtual EntityResolvergetEntityResolver () const =0
 Return the current entity resolver.
virtual ErrorHandlergetErrorHandler () const =0
 Return the current error handler.
virtual bool getFeature (const std::string &name) const =0
 Look up the value of a feature flag.
virtual void * getProperty (const std::string &name) const =0
 Look up the value of a property.
Transform
virtual void setContentHandler (ContentHandler *handler)=0
 Allow an application to register a content event handler.
virtual void setDTDHandler (DTDHandler *handler)=0
 Allow an application to register a DTD event handler.
virtual void setEntityResolver (EntityResolver *resolver)=0
 Allow an application to register an entity resolver.
virtual void setErrorHandler (ErrorHandler *handler)=0
 Allow an application to register an error event handler.
virtual void setFeature (const std::string &name, bool value)=0
 Set the value of a feature flag.
virtual void setProperty (const std::string &name, void *value)=0
 Set the value of a property.


Constructor & Destructor Documentation

virtual qgxml::XMLReader::~XMLReader  )  [inline, virtual]
 

Destructor.

Definition at line 89 of file XMLReader.H.


Member Function Documentation

virtual ContentHandler* qgxml::XMLReader::getContentHandler  )  const [pure virtual]
 

Return the current content handler.

Returns:
The current content handler, or null if none has been registered.

Implemented in qgxml::QtXMLReaderAdaptor, and qgxml::XercesXMLReaderAdaptor.

virtual DTDHandler* qgxml::XMLReader::getDTDHandler  )  const [pure virtual]
 

Return the current DTD handler.

Returns:
The current DTD handler, or null if none has been registered.

Implemented in qgxml::QtXMLReaderAdaptor, and qgxml::XercesXMLReaderAdaptor.

virtual EntityResolver* qgxml::XMLReader::getEntityResolver  )  const [pure virtual]
 

Return the current entity resolver.

Returns:
The current entity resolver, or null if none has been registered.

Implemented in qgxml::QtXMLReaderAdaptor, and qgxml::XercesXMLReaderAdaptor.

virtual ErrorHandler* qgxml::XMLReader::getErrorHandler  )  const [pure virtual]
 

Return the current error handler.

Returns:
The current error handler, or null if none has been registered.

Implemented in qgxml::QtXMLReaderAdaptor, and qgxml::XercesXMLReaderAdaptor.

virtual bool qgxml::XMLReader::getFeature const std::string &  name  )  const [pure virtual]
 

Look up the value of a feature flag.

Parameters:
name The feature name.
Returns:
The current value of the feature (true or false).

Implemented in qgxml::QtXMLReaderAdaptor, and qgxml::XercesXMLReaderAdaptor.

virtual void* qgxml::XMLReader::getProperty const std::string &  name  )  const [pure virtual]
 

Look up the value of a property.

Parameters:
name The property name.
Returns:
The current value of the property.

Implemented in qgxml::QtXMLReaderAdaptor, and qgxml::XercesXMLReaderAdaptor.

virtual void qgxml::XMLReader::parse const std::string &  systemId  )  [pure virtual]
 

Parse an XML document from a system identifier (URI).

This method is a shortcut for the common case of reading a document from a system identifier. It is the exact equivalent of parse(new InputSource(systemId));

Parameters:
systemId The system identifier (URI).

Implemented in qgxml::QtXMLReaderAdaptor, and qgxml::XercesXMLReaderAdaptor.

virtual void qgxml::XMLReader::parse InputSource input  )  [pure virtual]
 

Parse an XML document.

The application can use this method to instruct the XML reader to begin parsing an XML document from any valid input source (a character stream, a byte stream, or a URI).

During the parse, the XMLReader will provide information about the XML document through the registered event handlers.

Parameters:
input The input source for the top-level of the XML document.

Implemented in qgxml::QtXMLReaderAdaptor, and qgxml::XercesXMLReaderAdaptor.

Referenced by qgar::QgarAppDescr::init().

virtual void qgxml::XMLReader::setContentHandler ContentHandler handler  )  [pure virtual]
 

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.

Parameters:
handler The content handler.

Implemented in qgxml::QtXMLReaderAdaptor, and qgxml::XercesXMLReaderAdaptor.

Referenced by qgar::QgarAppDescr::init().

virtual void qgxml::XMLReader::setDTDHandler DTDHandler handler  )  [pure virtual]
 

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.

Parameters:
handler The DTD handler.

Implemented in qgxml::QtXMLReaderAdaptor, and qgxml::XercesXMLReaderAdaptor.

virtual void qgxml::XMLReader::setEntityResolver EntityResolver resolver  )  [pure virtual]
 

Allow an application to register an entity resolver.

If the application does not register an entity resolver, the XMLReader will perform its own default resolution.

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

Parameters:
resolver The entity resolver.

Implemented in qgxml::QtXMLReaderAdaptor, and qgxml::XercesXMLReaderAdaptor.

virtual void qgxml::XMLReader::setErrorHandler ErrorHandler handler  )  [pure virtual]
 

Allow an application to register an error event handler.

If the application does not register an error handler, all error events reported by the SAX parser will be silently ignored; however, normal processing may not continue.

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.

Parameters:
handler The error handler.

Implemented in qgxml::QtXMLReaderAdaptor, and qgxml::XercesXMLReaderAdaptor.

virtual void qgxml::XMLReader::setFeature const std::string &  name,
bool  value
[pure virtual]
 

Set the value of a feature flag.

Parameters:
name The feature name.
value The requested value of the feature (true or false).

Implemented in qgxml::QtXMLReaderAdaptor, and qgxml::XercesXMLReaderAdaptor.

virtual void qgxml::XMLReader::setProperty const std::string &  name,
void *  value
[pure virtual]
 

Set the value of a property.

Parameters:
name The property name.
value The requested value for the property.

Implemented in qgxml::QtXMLReaderAdaptor, and qgxml::XercesXMLReaderAdaptor.


The documentation for this class was generated from the following file: