This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Jetty vs. gcj


Jeff Sturm wrote:
- Jetty needs an XML parser.  I used Xerces, in spite of its large size.
It should be possible to use a smaller SAX-only parser.

The Kawa distribution includes gnu.xml.XMLParser (actually XMLParser.in, which can be pre-processed to a char or a byte version). It doesn't handle DTDs or encoding specifications (I want to add support for the latter). However, it is compact, very efficient (no numbers but it was written to minimize method calls and object allocation), and is standalone. It writes the result to ParsedXMLHandler interface, which is similar to SAX. The reason for the special-purpose interface is that SAX hardwires some assumptions that I wanted to make optional. There is a bridge from ParsedXMLHandler to SAX2 ContentHandler, and an sketch of an implementation of XMLReader (see gnu.kawa.sax), but it is not complete or tuned. (I don't use SAX myself. Instead I use a concpetually similar but less XML-specific Consumer interface.) -- --Per Bothner per at bothner dot com http://per.bothner.com/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]