All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface org.xml.sax.ErrorHandler

public interface ErrorHandler
A callback interface for basic XML error events.

This interface 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.

If you do not set an error handler, then a parser will report warnings to System.err, and will throw an (unspecified) exception for fata errors.

Author:
David Megginson, Microstar Software Ltd.
See Also:
setErrorHandler

Method Index

 o fatal(String, String, int, int)
Handle a fatal error.
 o warning(String, String, int, int)
Handle a non-fatal warning.

Methods

 o warning
 public abstract void warning(String message,
                              String systemID,
                              int line,
                              int column) throws Exception
Handle a non-fatal warning.

A SAX parser will use this callback to report a condition that is not serious enough to stop the parse (though you may still stop the parse if you wish).

Parameters:
message - The warning message.
systemID - The URI of the entity that caused the warning, or null if not available.
line - The line number in the entity, or -1 if not available.
column - The column number in the entity, or -1 if not available.
Throws: Exception
You may throw any exception.
 o fatal
 public abstract void fatal(String message,
                            String systemID,
                            int line,
                            int column) throws Exception
Handle a fatal error.

A SAX parser will use this callback to report a condition that is serious enough to invalidate the parse, and may not report all (or any) significant parse events after this. Ordinarily, you should stop immediately with an exception, but you can continue to try to collect more errors if you wish.

Parameters:
message - The error message.
systemID - The URI of the entity that caused the error, or null if not available.
line - The line number in the entity, or -1 if not available.
column - The column number in the entity, or -1 if not available.
Throws: Exception
You may throw any exception.

All Packages  Class Hierarchy  This Package  Previous  Next  Index