public class XmlErrorHandler
extends java.lang.Object
implements org.xml.sax.ErrorHandler
ErrorHandler
interface to handle validation errors while XML parsing.
This throws back exceptions raised for error
and fatalError
cases while a
LogWriter.warning(String)
level logging is done for the warning
case.Constructor and Description |
---|
XmlErrorHandler(LogWriter systemLogWriter,
java.lang.String xmlFileName) |
Modifier and Type | Method and Description |
---|---|
void |
error(org.xml.sax.SAXParseException exception)
Throws back the exception with the name of the XML file and the position where the exception
occurred.
|
void |
fatalError(org.xml.sax.SAXParseException exception)
Throws back the exception with the name of the XML file and the position where the exception
occurred.
|
void |
warning(org.xml.sax.SAXParseException exception)
Log the exception at
LogWriter.warning(String) level with XML filename and the position
of exception in the file. |
public XmlErrorHandler(LogWriter systemLogWriter, java.lang.String xmlFileName)
public void error(org.xml.sax.SAXParseException exception) throws org.xml.sax.SAXException
error
in interface org.xml.sax.ErrorHandler
org.xml.sax.SAXException
public void fatalError(org.xml.sax.SAXParseException exception) throws org.xml.sax.SAXException
fatalError
in interface org.xml.sax.ErrorHandler
org.xml.sax.SAXException
public void warning(org.xml.sax.SAXParseException exception) throws org.xml.sax.SAXException
LogWriter.warning(String)
level with XML filename and the position
of exception in the file.warning
in interface org.xml.sax.ErrorHandler
org.xml.sax.SAXException