|
GXPARSE hosted by | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xml.sax.helpers.DefaultHandler org.xml.sax.ext.DefaultHandler2 ca.gorman.xml.parse.sax.SAXErrorListener
public class SAXErrorListener
Report warnings, recoverable errors, and fatal errors from
SAXParser
or
XMLReader
. Default behavior is to stop on
the first fatal error.
Field Summary | |
---|---|
static int |
ACCEPT_NONE
|
static int |
FATAL_ERROR
|
static int |
RECOVERABLE_ERROR
|
static int |
WARNING
|
Constructor Summary | |
---|---|
SAXErrorListener(Writer writer)
Construct on the Writer that sends output to destination. |
Method Summary | |
---|---|
void |
error(SAXParseException exception)
Receive an error notification. |
void |
fatalError(SAXParseException exception)
Receive a fatal error notification. |
int |
getMaxCount()
Get the number of warnings or errors that will be reported before the next one will stop the parse. |
int |
getMaxErrorLevel()
Get the highest error level that will not immediately stop the parse. |
void |
setMaxCount(int i)
Set the number of warnings and errors that will be reported before the next one will stop the parse. |
void |
setMaxErrorLevel(int i)
Set the highest level of warning or error that will be accepted without immediately stopping the parse. |
void |
warning(SAXParseException exception)
Receive a warning notification. |
Methods inherited from class org.xml.sax.ext.DefaultHandler2 |
---|
attributeDecl, comment, elementDecl, endCDATA, endDTD, endEntity, externalEntityDecl, getExternalSubset, internalEntityDecl, resolveEntity, resolveEntity, startCDATA, startDTD, startEntity |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ACCEPT_NONE
public static final int WARNING
public static final int RECOVERABLE_ERROR
public static final int FATAL_ERROR
Constructor Detail |
---|
public SAXErrorListener(Writer writer)
Construct on the Writer that sends output to destination.
Method Detail |
---|
public void warning(SAXParseException exception) throws SAXException
Receive a warning notification.
warning
in interface ErrorHandler
warning
in class DefaultHandler
SAXException
public void error(SAXParseException exception) throws SAXException
Receive an error notification.
error
in interface ErrorHandler
error
in class DefaultHandler
SAXException
public void fatalError(SAXParseException exception) throws SAXException
Receive a fatal error notification.
fatalError
in interface ErrorHandler
fatalError
in class DefaultHandler
SAXException
public int getMaxErrorLevel()
Get the highest error level that will not immediately stop the parse.
setMaxErrorLevel(int)
public void setMaxErrorLevel(int i)
Set the highest level of warning or error that will be accepted without immediately stopping the parse. The levels, in increasing order of severity are:
The initial (default) value is SAXErrorListener.RECOVERABLE_ERROR.
IllegalArgumentException
- if the parameter is not one of the
values above.public int getMaxCount()
Get the number of warnings or errors that will be reported before the next one will stop the parse.
public void setMaxCount(int i)
Set the number of warnings and errors that will be reported before the next one will stop the parse. The initial (default) value is Integer.MAX_VALUE.
i
- an integer zero or greater.
IllegalArgumentException
- if the parameter is a negative integer
|
GXPARSE download | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |