Basic HTML version of Foils prepared August 1 99

Foil 41 Validation of Document

From Advanced XML and its applications CPS714 Computational Science Information Track -- July 7 99. by Lukasz Beca


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 }

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Aug 1 1999