1 | import org.xml.sax.Parser; |
2 | import org.xml.sax.ErrorHandler; |
3 | import org.xml.sax.helpers.ParserFactory; |
4 | |
5 | public class Validator { |
6 | |
7 | static final String parserClass = "com.ibm.xml.parsers.ValidatingSAXParser"; |
8 | |
9 | public static void main (String args[]) throws Exception { |
10 | Parser parser = ParserFactory.makeParser(parserClass); |
11 | ErrorHandler handler = new ErrorReport(); |
12 | parser.setErrorHandler(handler); |
13 | parser.parse(args[0]); |
14 | } |
15 | } |