Package org.dom4j.util
Class XMLErrorHandler
- java.lang.Object
-
- org.dom4j.util.XMLErrorHandler
-
- All Implemented Interfaces:
ErrorHandler
public class XMLErrorHandler extends Object implements 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, SAXParseException e)
Adds the given parse exception information to the given element instancevoid
error(SAXParseException e)
void
fatalError(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(SAXParseException e)
-
-
-
Constructor Detail
-
XMLErrorHandler
public XMLErrorHandler()
-
XMLErrorHandler
public XMLErrorHandler(Element errors)
-
-
Method Detail
-
error
public void error(SAXParseException e)
- Specified by:
error
in interfaceErrorHandler
-
fatalError
public void fatalError(SAXParseException e)
- Specified by:
fatalError
in interfaceErrorHandler
-
warning
public void warning(SAXParseException e)
- Specified by:
warning
in interfaceErrorHandler
-
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, SAXParseException e)
Adds the given parse exception information to the given element instance- Parameters:
element
- DOCUMENT ME!e
- DOCUMENT ME!
-
-