On Wed, Mar 07, 2001 at 10:07:37AM -0700, Nathaniel Hekman wrote:
> Here's another case that shows up often in html, but is illegal in xml, that
> I would need to parse: meta tags, <p> tags, <hr> tags, and other
> "singletons".
>
> <HEAD>
> <META HTTP-EQUIV="Content-Type" CONTENT="text/html">
> </HEAD>
>
> xml_parse would give an error, because the HEAD block is being closed with a
> still-open META "block".
Within the context of parsing HTML as XML, there's not really much that
can be done. I suppose you could pre-proces the HTML to make it
XML-complaitn, but that's probably more trouble than I would go to.
You're not going to find an XML parser that allows for most HTML,
because if such a parser did exist, it would be a broken XML parser. :)
The only kind of HTML you can reliably parse with XML parsers is the
XHTML variety (Which is simply HTML4, made XML-compliant)
Matt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]