Can't see namespace definition with DOMXML in 4.2.1

From: Date: Wed, 15 May 2002 17:39:21 +0000
Subject: Can't see namespace definition with DOMXML in 4.2.1
Groups: php.general 
Request: Send a blank email to php-general+get-97799@lists.php.net to get a copy of this message
It seems that lots of DOM stuff was added in 4.2.1! Still I can't seem to see the namespace definition attributes of an element. The code: $xmlstr='<?xml version="1.0"?><element xmlns:ns1="http://www.ns.com/ns1/" attr="value"/>'; $domdoc=domxml_open_mem($xmlstr); $root=$domdoc->document_element(); echo("<pre>".htmlentities($domdoc->html_dump_mem())."</pre>"); just returns: <element attr="value"></element> instead of the full: <element xmlns:ns1="http://www.ns.com/ns1/" attr="value"></element> Even trying to get the attributes from <element> with $elem->attributes() returns an array that only contains only "attr" but "xmlns:ns1" is nowhere to be seen. Is there a way that I'm missing to get the namespace definitions or is the code not in place yet? thanks in advance, thalis

« previous php.general (#97799) next »