SAX : Simple API for XML

previous next

import org.xml.sax.*;
import org.xml.sax.helpers.*;
import javax.xml.parsers.*;

public class SaxParse {

public static void main (String args[]) throws Exception {

    SAXParserFactory factory=SAXParserFactory.newInstance();

    SAXParser parser=factory.newSAXParser();

    DefaultHandler handler = new MyHandler();

    try {
       parser.parse(args[0], handler);    
    }
    catch (SAXException e){
        System.out.println(e.getMessage());
    }
}
    
}

 
 

XML/Processeur    5/3/2004

78/86