Re: [xml] php5 breaks html parser

On 4.5.2009 21:01 Uhr, Bernhard zwischenbrugger wrote:
Hi all

First of all, I tried to report this bug at the PHP Bug reporting system.

People at PHP don't feel responsible for that. So maybe it's a libxml

We already told you, that the loadHTML*() Methods are not namespace
aware and only meant for non-namespace-aware HTML4 documents and not
XHTML. Use the XML methods, if you're so keen on the namespaces.

And yes, this difference comes from the libxml2 library, but I don't
think anyone will tell you anything else here.


Problem Description:

PHP dublicates the xhtml namespace.


echo $dom->saveXML($dom->documentElement);

Expected result:
Well formed XML.

Actual result:
<html xmlns="";
xmlns=""; <> ...

(duplicate namespace)


See also my error page at:



PS: The php dom html-parser worked without problems for years.

xml mailing list, project page
xml gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]