Package org.dom4j.util
Class XMLErrorHandler
- java.lang.Object
-
- org.dom4j.util.XMLErrorHandler
-
- All Implemented Interfaces:
org.xml.sax.ErrorHandler
public class XMLErrorHandler extends java.lang.Object implements org.xml.sax.ErrorHandler
XMLErrorHandler
is a SAXErrorHandler
which turns the SAX parsing errors into XML so that the output can be formatted using XSLT or the errors can be included in a SOAP message.
-
-
Field Summary
Fields Modifier and Type Field Description protected static QName
ERROR_QNAME
protected static QName
FATALERROR_QNAME
protected static QName
WARNING_QNAME
-
Constructor Summary
Constructors Constructor Description XMLErrorHandler()
XMLErrorHandler(Element errors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addException(Element element, org.xml.sax.SAXParseException e)
Adds the given parse exception information to the given element instancevoid
error(org.xml.sax.SAXParseException e)
void
fatalError(org.xml.sax.SAXParseException e)
QName
getErrorQName()
Element
getErrors()
QName
getFatalErrorQName()
QName
getWarningQName()
void
setErrorQName(QName errorQName)
void
setErrors(Element errors)
void
setFatalErrorQName(QName fatalErrorQName)
void
setWarningQName(QName warningQName)
void
warning(org.xml.sax.SAXParseException e)
-
-
-
Constructor Detail
-
XMLErrorHandler
public XMLErrorHandler()
-
XMLErrorHandler
public XMLErrorHandler(Element errors)
-
-
Method Detail
-
error
public void error(org.xml.sax.SAXParseException e)
- Specified by:
error
in interfaceorg.xml.sax.ErrorHandler
-
fatalError
public void fatalError(org.xml.sax.SAXParseException e)
- Specified by:
fatalError
in interfaceorg.xml.sax.ErrorHandler
-
warning
public void warning(org.xml.sax.SAXParseException e)
- Specified by:
warning
in interfaceorg.xml.sax.ErrorHandler
-
getErrors
public Element getErrors()
-
setErrors
public void setErrors(Element errors)
-
getErrorQName
public QName getErrorQName()
-
setErrorQName
public void setErrorQName(QName errorQName)
-
getFatalErrorQName
public QName getFatalErrorQName()
-
setFatalErrorQName
public void setFatalErrorQName(QName fatalErrorQName)
-
getWarningQName
public QName getWarningQName()
-
setWarningQName
public void setWarningQName(QName warningQName)
-
addException
protected void addException(Element element, org.xml.sax.SAXParseException e)
Adds the given parse exception information to the given element instance- Parameters:
element
- DOCUMENT ME!e
- DOCUMENT ME!
-
-