Re: Re: PHP5: ext/dom - set namespace of node manually

From: Date: Mon, 16 Feb 2004 07:46:51 +0000
Subject: Re: Re: PHP5: ext/dom - set namespace of node manually
References: 1 2  Groups: php.general php.xml.dev 
Request: Send a blank email to php-general+get-177778@lists.php.net to get a copy of this message
On 2/16/04 1:24 AM, Adam Bregenzer wrote:
On Sun, 2004-02-15 at 19:04, Vivian Steller wrote:
As you can see it is impossible to set the namespace manually! I tried to set it with the help of a DomNamespaceNode-object but those objects are no "real" nodes (why!?!) and the consequence is that you couldn't append such a node with $node->appendChild($domnamspacenode_object); ...
I am not sure if PHP 5 has many changes from PHP 4, however have you tried calling set_namespace[1]? $node->set_namespace('http://www.somedomain.de/'); [1] http://www.php.net/domnode-set-namespace
Vivian, it's not possible the set the namespace according to the W3C standard, except with createElementNS(). As Adam said, in PHP 4, there was the option set_namespace, which isn't ported to PHP5 (yet). Maybe we should port that function as well, to allow some deeper level manipulation of the namespaces... Currently, I don't have a solution to your problem, except porting setNamespace to PHP5... chregu -- christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71 http://www.bitflux.ch | chregu@bitflux.ch | gnupg-keyid 0x5CE1DECB

« previous php.general (#177778) next »