Re: Basic XSL HTML-> XML query

Timothy Jones <[email protected]> Sun, 8 Jan 2012 15:24:33 +0000
Newsgroups gmane.text.xml.xalan.java.user
Message-ID <1745CD479C379E46867E272E7FD9A29C525BA932@dalmbx04.ad.syniverse.com>
I recall using a small Java library called Neko to parse HTML into an XML D=
OM.  It did the trick!   Just wanted to add it to the list.


tlj

----- Original Message -----
From: Michael Ludwig [mailto:[email protected]]
Sent: Sunday, January 08, 2012 04:57 AM=0A=
To: [email protected] <[email protected]>
Subject: Re: Basic XSL HTML-> XML query

[email protected] schrieb am 07.01.2012 um 21:18 (-0500):
> The problem is, HTML is not an XML-based language, so unless you've
> deliberately written your input document as XHTML, odds are that no
> XML parser will accept it.

Sure, but as you're saying:

> There are HTML parsers available which produce SAX or DOM (XML)
> output. You could get one of those, use it to read the input document,
> and route its output to Xalan for processing.
>=20
> Or you could look for a tool which rewrites HTML as XHTML. I believe
> the W3C's "tidy" tool can be configured to do that. Then you'd run the
> resulting XHTML document (which _is_ XML) through Xalan.

Choices include:

* tidy
* libxml2
* tagsoup

--=20
Michael Ludwig