1 /* $Id: XmlErrorHandler.java 1 2010-02-24 13:03:05Z haidw $ */
2 package dol.parser.xml;
4 import org.xml.sax.SAXParseException;
5 import org.xml.sax.helpers.DefaultHandler;
11 public class XmlErrorHandler extends DefaultHandler {
16 public XmlErrorHandler() {
21 * Treat validation errors as fatal
23 * @param e Description of the Parameter
24 * @exception SAXParseException MyException If such and such occurs
26 public void error(SAXParseException e)
27 throws SAXParseException {
28 System.out.println("Error found: " + e.getMessage());
35 * @param err Description of the Parameter
36 * @exception SAXParseException MyException If such and such occurs
38 public void warning(SAXParseException err)
39 throws SAXParseException {
40 System.out.println("** Warning"
41 + ", line " + err.getLineNumber()
42 + ", uri " + err.getSystemId());
43 System.out.println(" " + err.getMessage());