> Good thinking. I've had a look at the Swing source. It
> includes a parser (html32.java) generated using the java
> compiler-compiler JavaCC. This calls a callback interface
> HTMMLParserCallback.java, similar in concept to SAX, though
> it seems to include both generic (start/end element) and
> element-specific (e.g. startUL) callbacks. Of course the
> main difference from a SAX application will be that the
> elements are not properly nested.
The SAX driver could enforce proper nesting using an element stack and
various heuristics, but it might not always get it right.
All the best,
David
-- David Megginson david@megginson.com http://www.megginson.com/