All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.xml.sax.HandlerBase

java.lang.Object
   |
   +----org.xml.sax.HandlerBase

public class HandlerBase
extends Object
implements EntityHandler, DocumentHandler, ErrorHandler
A simple base class for deriving SAX event handlers.

This class is part of the Java implementation of SAX, the Simple API for XML. It is free for both commercial and non-commercial use, and is distributed with no warrantee, real or implied.

This class implements the default behaviour when no handler is specified (though parsers are not actually required to use this class).

Author:
David Megginson, Microstar Software Ltd.
See Also:
XmlException, EntityHandler, DocumentHandler, ErrorHandler

Constructor Index

 o HandlerBase()

Method Index

 o changeEntity(String)
Handle an entity-change event.
 o characters(char[], int, int)
Handle a character data event.
 o doctype(String, String, String)
Handle a document type declaration event.
 o endDocument()
Handle a end document event.
 o endElement(String)
Handle an end element event.
 o fatal(String, String, int, int)
Handle a fatal error.
 o ignorable(char[], int, int)
Handle an ignorable whitespace event.
 o processingInstruction(String, String)
Handle a processing instruction event.
 o resolveEntity(String, String, String)
Resolve an external entity.
 o startDocument()
Handle a start document event.
 o startElement(String, AttributeMap)
Handle a start element event.
 o warning(String, String, int, int)
Handle a non-fatal error.

Constructors

 o HandlerBase
 public HandlerBase()

Methods

 o resolveEntity
 public String resolveEntity(String ename,
                             String publicID,
                             String systemID) throws Exception
Resolve an external entity.

By default, simply return the system ID supplied.

Throws: Exception
When you override this method, you may throw any exception.
See Also:
resolveEntity
 o changeEntity
 public void changeEntity(String systemID) throws Exception
Handle an entity-change event.

By default, do nothing.

Throws: Exception
When you override this method, you may throw any exception.
See Also:
changeEntity
 o startDocument
 public void startDocument() throws Exception
Handle a start document event.

By default, do nothing.

Throws: Exception
When you override this method, you may throw any exception.
See Also:
startDocument
 o endDocument
 public void endDocument() throws Exception
Handle a end document event.

By default, do nothing.

Throws: Exception
When you override this method, you may throw any exception.
See Also:
endDocument
 o doctype
 public void doctype(String name,
                     String publicID,
                     String systemID) throws Exception
Handle a document type declaration event.

By default, do nothing.

Throws: Exception
When you override this method, you may throw any exception.
See Also:
doctype
 o startElement
 public void startElement(String name,
                          AttributeMap attributes) throws Exception
Handle a start element event.

By default, do nothing.

Throws: Exception
When you override this method, you may throw any exception.
See Also:
startElement
 o endElement
 public void endElement(String name) throws Exception
Handle an end element event.

By default, do nothing.

Throws: Exception
When you override this method, you may throw any exception.
See Also:
endElement
 o characters
 public void characters(char ch[],
                        int start,
                        int length) throws Exception
Handle a character data event.

By default, do nothing.

Throws: Exception
When you override this method, you may throw any exception.
See Also:
characters
 o ignorable
 public void ignorable(char ch[],
                       int start,
                       int length) throws Exception
Handle an ignorable whitespace event.

By default, do nothing.

Throws: Exception
When you override this method, you may throw any exception.
See Also:
ignorable
 o processingInstruction
 public void processingInstruction(String name,
                                   String remainder) throws Exception
Handle a processing instruction event.

By default, do nothing.

Throws: Exception
When you override this method, you may throw any exception.
See Also:
processingInstruction
 o warning
 public void warning(String message,
                     String systemID,
                     int line,
                     int column) throws Exception
Handle a non-fatal error.

By default, report the warning to System.err.

Throws: Exception
When you override this method, you may throw any exception.
See Also:
warning
 o fatal
 public void fatal(String message,
                   String systemID,
                   int line,
                   int column) throws XmlException, Exception
Handle a fatal error.

By default, throw an instance of XmlException.

Throws: XmlException
A fatal parsing error has been found.
Throws: Exception
When you override this method, you may throw any exception.
See Also:
fatal

All Packages  Class Hierarchy  This Package  Previous  Next  Index