[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

ITP: lib Sax and lib XP : XML parsers in Java



				
I intent to package the Sax library <http://www.megginson.com/SAX/sax.html> 
and the XP library <http://www.jclark.com/xml/xp/index.html> which, together, 
allows you to write XML parsers in Java ("In one hour", says the ads :-)

Sax is public domain, XP's licence is MIT X11.

Actually, it is already done and it works :-) Expect an upload soon.



import org.xml.sax.Parser;
import org.xml.sax.DocumentHandler;
import org.xml.sax.helpers.ParserFactory;

public class UnTag {
   
    static final String parserClass = "com.jclark.xml.sax.Driver";
    
    public static void main (String args[])
        throws Exception
    {
        Parser parser = ParserFactory.makeParser (parserClass);
        DocumentHandler handler = new UnTagHandler();
        parser.setDocumentHandler (handler);
        for (int i = 0; i < args.length; i++) {
            parser.parse (args[i]);
        }
    }
    
}




Reply to: