[Htmlparser-developer] SwingParser update
Brought to you by:
derrickoswald
From: Craig R. <cr...@qu...> - 2002-05-13 10:36:30
|
Wrong mail address, again :> -------- Hi Somik, I thought I'd brief you on how my investigation in the SwingParser was going. I took your CVS module and managed with some changes to integrate it into Swing's JEditorPane HTML renderer to make a simple HTML browser. It soon become apparent however that the renderer requires perfectly formed HTML. After playing with the idea of trying to fix bad HTML myself, I realised the enormity of this task and looked for an existing implementation. JTidy (http://www.sourceforge.net/projects/jtidy), a port of a C library (HTML Tidy), is another SourceForge project which performs HTML validation and pretty-printing. It produces a DOM of the HTML page from an InputStream from which I performed the relevant callbacks. The result is a good replacement for Sun's DocumentParser, and it produces a nice output of what was wrong/fixed during parsing. I am still trying to determine whether the 174kb it adds on to any project is worth it tho (and if there are any performance implications). I haven't checked my code back in since it longer depends on htmlparser in any way, but I can send it to you if you're interested. -craig |