1 | import org.xml.sax.ErrorHandler; |
2 | import org.xml.sax.SAXException; |
3 | import org.xml.sax.SAXParseException; |
4 | |
5 | public class ErrorReport |
6 | implements ErrorHandler { |
7 | |
8 | /** Warning. */ |
9 | public void warning(SAXParseException ex) { |
10 | System.err.println("[Warning] "+ |
11 | getLocationString(ex)+": "+ |
12 | ex.getMessage()); |
13 | } |
14 | |
15 | /** Error. */ |
16 | public void error(SAXParseException ex) { |
17 | System.err.println("[Error] "+ |
18 | getLocationString(ex)+": "+ |
19 | ex.getMessage()); |
20 | } |