HTML to XML

David Megginson david at megginson.com
Thu Jul 16 02:34:21 BST 1998


jmtang at us.ibm.com writes:

 > 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 at megginson.com
           http://www.megginson.com/

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list