Content Pipeline Guide > SAX2 Filter Interfaces > LexicalHandler Interface
  
LexicalHandler Interface
The LexicalHandler is an optional extension handler for SAX2 that provides lexical information about an XML document, such as comments and CDATA section boundaries. XML readers are not required to recognize this handler, and it is not part of core-only SAX2 distributions.
Events in the LexicalHandler interface apply to an entire document, not just to the document element. All LexicalHandler events must appear between the content handler’s startDocument and endDocument events.
package org.xml.sax.ext;
import org.xml.sax.SAXException;
public interface LexicalHandler
{
public abstract void startDTD
(String name, String publicId,
String systemId)
throws SAXException;
public abstract void endDTD ()
throws SAXException;
public abstract void startEntity (String name)
throws SAXException;
public abstract void endEntity (String name)
throws SAXException;
public abstract void startCDATA ()
throws SAXException;
public abstract void endCDATA ()
throws SAXException;
public abstract void comment
(char ch[], int start, int length)
throws SAXException;
}