Basic HTML version of Foils prepared August 1 99

Foil 34 Browsing Document with SAX Parser

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.DocumentHandler;
3 import org.xml.sax.helpers.ParserFactory;
4
5 public class XMLContent {
6 static final String parserClass = "com.ibm.xml.parsers.SAXParser";
7 public static void main (String args[]) throws Exception {
8 Parser parser = ParserFactory.makeParser(parserClass);
9 DocumentHandler handler = new MyHandler();
10 parser.setDocumentHandler(handler);
11 for (int i = 0; i < args.length; i++) {
12 parser.parse(args[i]);
13 }
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