> Sorry that I did not make the question clear. What I am working on
> is to retrieve some information, e.g. news articles, from the web
> and feed the content to an application client which only knows
> application-specific XML. Therefore, I need to read the HTML file,
> analyze it, strip away all presentation tags/contents, and convert
> the real content to the application-specific XML. Instead of
> writing my own HTML parser, I hope I can find some tool to help me
> or hopefully one of the XML parser can do the job. I prefer Java,
> but I'll consider anything available.
To my knowledge, there has never been a general SGML parser written in
Java; however, there is a Java-based HTML parser with much SGML
functionality that was written originally for HotJava. I have no idea
where it lives right now, but it might be worth poking around.
Another alternative, if the HTML really is valid HTML, is to do a
first pass with James Clark's SX application (part of SP) to convert
the HTML to well-formed XML, then do the rest of the work in Java with
XML parsers.
We desperately need a SAX parser that parses HTML instead of XML --
any takers?
All the best,
David
-- David Megginson david@megginson.com http://www.megginson.com/