Xerces-C++: LexicalHandler Class Reference

Xerces-C++ 3.3.0

List of all members
LexicalHandler Class Referenceabstract

Receive notification of lexical events. More...

`#include <xercesc/sax2/LexicalHandler.hpp>`

Inheritance diagram for LexicalHandler:

## Public Member Functions
Constructors and Destructor
| LexicalHandler ()
| Default constructor.
virtual | ~LexicalHandler ()
| Destructor.

## The virtual document handler interface
virtual void | comment (const XMLCh *const chars, const XMLSize_t length)=0
| Receive notification of comments.
virtual void | endCDATA ()=0
| Receive notification of the end of a CDATA section.
virtual void | endDTD ()=0
| Receive notification of the end of the DTD declarations.
virtual void | endEntity (const XMLCh *const name)=0
| Receive notification of the end of an entity.
virtual void | startCDATA ()=0
| Receive notification of the start of a CDATA section.
virtual void | startDTD (const XMLCh *const name, const XMLCh *const publicId, const XMLCh *const systemId)=0
| Receive notification of the start of the DTD declarations.
virtual void | startEntity (const XMLCh *const name)=0
| Receive notification of the start of an entity.

## Detailed Description

Receive notification of lexical events.

This is an extension handler for that provides lexical information about an XML document. It does not provide information about document content. For those events, an application must register an instance of a ContentHandler.

The order of events in this interface is very important, and mirrors the order of information in the document itself. For example, startDTD() and endDTD() events will occur before the first element in the document.

See also
  SAX2XMLReader::setLexicalHandler
  SAX2XMLReader::setContentHandler

## Constructor & Destructor Documentation

## ◆ LexicalHandler()

LexicalHandler::LexicalHandler | ( |  | ) |

Default constructor.

## ◆ ~LexicalHandler()

virtual LexicalHandler::~LexicalHandler | ( |  | ) |
| virtual

Destructor.

## Member Function Documentation

## ◆ comment()

virtual void LexicalHandler::comment | ( | const XMLCh *const | chars,
|  | const XMLSize_t | length )
| pure virtual

Receive notification of comments.

The Parser will call this method to report each occurrence of a comment in the XML document.

The application must not attempt to read from the array outside of the specified range.

Parameters

  chars | The characters from the XML document.
  length | The number of characters to read from the array.

Exceptions

  SAXException | Any SAX exception, possibly wrapping another exception.

Implemented in DefaultHandler.

## ◆ endCDATA()

virtual void LexicalHandler::endCDATA | ( |  | ) |
| pure virtual

Receive notification of the end of a CDATA section.

The SAX parser will invoke this method at the end of each CDATA parsed.

Exceptions

  SAXException | Any SAX exception, possibly wrapping another exception.

Implemented in DefaultHandler.

## ◆ endDTD()

virtual void LexicalHandler::endDTD | ( |  | ) |
| pure virtual

Receive notification of the end of the DTD declarations.

The SAX parser will invoke this method at the end of the DTD

Exceptions

  SAXException | Any SAX exception, possibly wrapping another exception.

Implemented in DefaultHandler.

## ◆ endEntity()

virtual void LexicalHandler::endEntity | ( | const XMLCh *const | name | ) |
| pure virtual

Receive notification of the end of an entity.

The SAX parser will invoke this method at the end of an entity

Parameters

  name | The name of the entity that is ending.

Exceptions

  SAXException | Any SAX exception, possibly wrapping another exception.

Implemented in DefaultHandler.

## ◆ startCDATA()

virtual void LexicalHandler::startCDATA | ( |  | ) |
| pure virtual

Receive notification of the start of a CDATA section.

The SAX parser will invoke this method at the start of each CDATA parsed.

Exceptions

  SAXException | Any SAX exception, possibly wrapping another exception.

Implemented in DefaultHandler.

## ◆ startDTD()

virtual void LexicalHandler::startDTD | ( | const XMLCh *const | name,
|  | const XMLCh *const | publicId,
|  | const XMLCh *const | systemId )
| pure virtual

Receive notification of the start of the DTD declarations.

The SAX parser will invoke this method at the start of the DTD

Parameters

  name | The document type name.
  publicId | The declared public identifier for the external DTD subset, or null if none was declared.
  systemId | The declared system identifier for the external DTD subset, or null if none was declared.

Exceptions

  SAXException | Any SAX exception, possibly wrapping another exception.

Implemented in DefaultHandler.

## ◆ startEntity()

virtual void LexicalHandler::startEntity | ( | const XMLCh *const | name | ) |
| pure virtual

Receive notification of the start of an entity.

The SAX parser will invoke this method at the start of an entity

Parameters

  name | The name of the entity that is starting.

Exceptions

  SAXException | Any SAX exception, possibly wrapping another exception.

Implemented in DefaultHandler.

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

- LexicalHandler.hpp