+/* $Id: XmlErrorHandler.java 1 2010-02-24 13:03:05Z haidw $ */
+package dol.parser.xml;
+
+import org.xml.sax.SAXParseException;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * This class ...
+ */
+
+public class XmlErrorHandler extends DefaultHandler {
+
+ /**
+ * Empty constructor
+ */
+ public XmlErrorHandler() {
+ super();
+ }
+
+ /**
+ * Treat validation errors as fatal
+ *
+ * @param e Description of the Parameter
+ * @exception SAXParseException MyException If such and such occurs
+ */
+ public void error(SAXParseException e)
+ throws SAXParseException {
+ System.out.println("Error found: " + e.getMessage());
+ throw e;
+ }
+
+ /**
+ * Dump warnings too
+ *
+ * @param err Description of the Parameter
+ * @exception SAXParseException MyException If such and such occurs
+ */
+ public void warning(SAXParseException err)
+ throws SAXParseException {
+ System.out.println("** Warning"
+ + ", line " + err.getLineNumber()
+ + ", uri " + err.getSystemId());
+ System.out.println(" " + err.getMessage());
+ }
+}