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


import org.xml.sax.Parser;
import org.xml.sax.DocumentHandler;
import org.xml.sax.helpers.ParserFactory;
public class XMLContent {
static final String parserClass = "com.ibm.xml.parsers.SAXParser";
public static void main (String args[]) throws Exception {
Parser parser = ParserFactory.makeParser(parserClass);
DocumentHandler handler = new MyHandler();
parser.setDocumentHandler(handler);
for (int i = 0; i < args.length; i++) {
parser.parse(args[i]);
}
}
}



© 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