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

qgxml::DefaultHandler Class Reference
[XML SAX Module]

#include <qgarlib/sax/DefaultHandler.H>

Inheritance diagram for qgxml::DefaultHandler:

qgxml::ContentHandler qgxml::DTDHandler qgxml::EntityResolver qgxml::ErrorHandler qgar::QgarAppDescr List of all members.

Detailed Description

Default base class for SAX2 event handlers.

This class is available as a convenience base class for SAX2 applications: it provides default implementations for all of the callbacks in the four core SAX2 handler classes:

See also:
ContentHandler

DTDHandler

EntityResolver

ErrorHandler

Author:
Jan Rendek
Date:
March 3, 2003 17:47
Since:
Qgar 2.1.1

Definition at line 73 of file DefaultHandler.H.

Public Member Functions

ContentHandler Impl
virtual void characters (const char *ch, const unsigned int start, const unsigned int length)
 Receive notification of character data.
virtual void endDocument ()
 Receive notification of the end of a document.
virtual void endElement (const std::string &uri, const std::string &localName, const std::string &qName)
 Receive notification of the end of an element.
virtual void endPrefixMapping (const std::string &prefix)
 End the scope of a prefix-URI mapping.
virtual void ignorableWhitespace (const char *ch, const unsigned int start, const unsigned int length)
 Receive notification of ignorable whitespace in element content.
virtual void processingInstruction (const std::string &target, const std::string &data)
 Receive notification of a processing instruction.
virtual void setDocumentLocator (Locator *locator)
 Receive an object for locating the origin of SAX document events.
virtual void skippedEntity (const std::string &name)
 Receive notification of a skipped entity.
virtual void startDocument ()
 Receive notification of the beginning of a document.
virtual void startElement (const std::string &uri, const std::string &localName, const std::string &qName, const Attributes &atts)
 Receive notification of the beginning of an element.
virtual void startPrefixMapping (const std::string &prefix, const std::string &uri)
 Begin the scope of a prefix-URI Namespace mapping.
DTDHandler Impl
virtual void notationDecl (const std::string &name, const std::string &publicId, const std::string &systemId)
 Receive notification of a notation declaration event.
virtual void unparsedEntityDecl (const std::string &name, const std::string &publicId, const std::string &systemId, const std::string &notationName)
 Receive notification of an unparsed entity declaration event.
EntityResolver Impl
virtual InputSourceresolveEntity (const std::string &publicId, const std::string &systemId)
 Allow the application to resolve external entities.
ErrorHandler Impl
virtual void error (const SAXParseException &exception)
 Receive notification of a recoverable error.
virtual void fatalError (const SAXParseException &exception)
 Receive notification of a non-recoverable error.
virtual void warning (const SAXParseException &exception)
 Receive notification of a warning.


Member Function Documentation

virtual void qgxml::DefaultHandler::characters const char *  ch,
const unsigned int  start,
const unsigned int  length
[inline, virtual]
 

Receive notification of character data.

Parameters:
ch The characters from the XML document.
start The start position in the array.
length The number of characters to read from the array.

Implements qgxml::ContentHandler.

Reimplemented in qgar::QgarAppDescr.

Definition at line 93 of file DefaultHandler.H.

virtual void qgxml::DefaultHandler::endDocument  )  [inline, virtual]
 

Receive notification of the end of a document.

The SAX parser will invoke this method only once, and it will be the last method invoked during the parse. The parser shall not invoke this method until it has either abandoned parsing (because of an unrecoverable error) or reached the end of input.

See also:
startDocument()

Implements qgxml::ContentHandler.

Definition at line 99 of file DefaultHandler.H.

virtual void qgxml::DefaultHandler::endElement const std::string &  uri,
const std::string &  localName,
const std::string &  qName
[inline, virtual]
 

Receive notification of the end of an element.

The SAX parser will invoke this method at the end of every element in the XML document; there will be a corresponding startElement event for every endElement event (even when the element is empty).

Parameters:
uri The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
localName The local name (without prefix), or the empty string if Namespace processing is not being performed.
qName The qualified XML 1.0 name (with prefix), or the empty string if qualified names are not available.
See also:
startElement()

Implements qgxml::ContentHandler.

Reimplemented in qgar::QgarAppDescr.

Definition at line 103 of file DefaultHandler.H.

virtual void qgxml::DefaultHandler::endPrefixMapping const std::string &  prefix  )  [inline, virtual]
 

End the scope of a prefix-URI mapping.

Parameters:
prefix The prefix that was being mapped. This is the empty string when a default mapping scope ends.
See also:
startPrefixMapping

Implements qgxml::ContentHandler.

Definition at line 109 of file DefaultHandler.H.

virtual void qgxml::DefaultHandler::error const SAXParseException exception  )  [inline, virtual]
 

Receive notification of a recoverable error.

Parameters:
exception The error information encapsulated in a SAX parse exception.

Implements qgxml::ErrorHandler.

Definition at line 182 of file DefaultHandler.H.

virtual void qgxml::DefaultHandler::fatalError const SAXParseException exception  )  [inline, virtual]
 

Receive notification of a non-recoverable error.

Parameters:
exception The error information encapsulated in a SAX parse exception.

Implements qgxml::ErrorHandler.

Reimplemented in qgar::QgarAppDescr.

Definition at line 186 of file DefaultHandler.H.

virtual void qgxml::DefaultHandler::ignorableWhitespace const char *  ch,
const unsigned int  start,
const unsigned int  length
[inline, virtual]
 

Receive notification of ignorable whitespace in element content.

Parameters:
ch The characters from the XML document.
start The start position in the array.
length The number of characters to read from the array.

Implements qgxml::ContentHandler.

Definition at line 113 of file DefaultHandler.H.

virtual void qgxml::DefaultHandler::notationDecl const std::string &  name,
const std::string &  publicId,
const std::string &  systemId
[inline, virtual]
 

Receive notification of a notation declaration event.

Parameters:
name The notation name.
publicId The notation's public identifier.
systemId The notation's system identifier.

Implements qgxml::DTDHandler.

Definition at line 154 of file DefaultHandler.H.

virtual void qgxml::DefaultHandler::processingInstruction const std::string &  target,
const std::string &  data
[inline, virtual]
 

Receive notification of a processing instruction.

Parameters:
target The processing instruction target.
data The processing instruction data. The data does not include any whitespace separating it from the target.

Implements qgxml::ContentHandler.

Definition at line 119 of file DefaultHandler.H.

virtual InputSource* qgxml::DefaultHandler::resolveEntity const std::string &  publicId,
const std::string &  systemId
[inline, virtual]
 

Allow the application to resolve external entities.

Parameters:
publicId The public identifier of the external entity being referenced.
systemId The system identifier of the external entity being referenced.
Returns:
An InputSource object describing the new input source.

Implements qgxml::EntityResolver.

Definition at line 172 of file DefaultHandler.H.

virtual void qgxml::DefaultHandler::setDocumentLocator Locator locator  )  [inline, virtual]
 

Receive an object for locating the origin of SAX document events.

Parameters:
locator An object that can return the location of any SAX document event.

Implements qgxml::ContentHandler.

Definition at line 124 of file DefaultHandler.H.

virtual void qgxml::DefaultHandler::skippedEntity const std::string &  name  )  [inline, virtual]
 

Receive notification of a skipped entity.

Parameters:
name The name of the skipped entity.

Implements qgxml::ContentHandler.

Definition at line 128 of file DefaultHandler.H.

virtual void qgxml::DefaultHandler::startDocument  )  [inline, virtual]
 

Receive notification of the beginning of a document.

The SAX parser will invoke this method only once, before any other event callbacks (except for setDocumentLocator()).

See also:
endDocument()

Implements qgxml::ContentHandler.

Definition at line 132 of file DefaultHandler.H.

virtual void qgxml::DefaultHandler::startElement const std::string &  uri,
const std::string &  localName,
const std::string &  qName,
const Attributes atts
[inline, virtual]
 

Receive notification of the beginning of an element.

The Parser will invoke this method at the beginning of every element in the XML document; there will be a corresponding endElement event for every startElement event (even when the element is empty). All of the element's content will be reported, in order, before the corresponding endElement event.

Parameters:
uri The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
localName The local name (without prefix), or the empty string if Namespace processing is not being performed.
qName The qualified name (with prefix), or the empty string if qualified names are not available.
atts The attributes attached to the element.
See also:
endElement()

Implements qgxml::ContentHandler.

Reimplemented in qgar::QgarAppDescr.

Definition at line 136 of file DefaultHandler.H.

virtual void qgxml::DefaultHandler::startPrefixMapping const std::string &  prefix,
const std::string &  uri
[inline, virtual]
 

Begin the scope of a prefix-URI Namespace mapping.

Parameters:
prefix The Namespace prefix being declared. An empty string is used for the default element namespace, which has no prefix.
uri The Namespace URI the prefix is mapped to.
See also:
endPrefixMapping()

Implements qgxml::ContentHandler.

Definition at line 143 of file DefaultHandler.H.

virtual void qgxml::DefaultHandler::unparsedEntityDecl const std::string &  name,
const std::string &  publicId,
const std::string &  systemId,
const std::string &  notationName
[inline, virtual]
 

Receive notification of an unparsed entity declaration event.

Parameters:
name The unparsed entity's name.
publicId The entity's public identifier.
systemId The entity's system identifier.
notationName The name of the associated notation.

Implements qgxml::DTDHandler.

Definition at line 160 of file DefaultHandler.H.

virtual void qgxml::DefaultHandler::warning const SAXParseException exception  )  [inline, virtual]
 

Receive notification of a warning.

Parameters:
exception The warning information encapsulated in a SAX parse exception.

Implements qgxml::ErrorHandler.

Definition at line 190 of file DefaultHandler.H.


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