Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

[email protected] ("Rob Richards") Sun, 22 Feb 2004 08:22:37 -0500
Newsgroups php.general,php.xml.dev
Message-ID <[email protected]>
From: Vivian Steller

> i now can use the following syntax to set the namespaceUri of a node:
>
> <?php
>         $element = new DomElement("tagname", "value",
"http://namespaceUri");
>         // or
>         $element = new DomElement("pref:tagname", "value",
"http://namespaceUri");
>         // works as well
> ?>

Your point for adding this was well made (as well as others expressing the
same view), so support has been added to the DomElement constructor. as well
as the examples above, to create a node with no value in a namespace:
$element = new DomElement("pref:tagname", NULL, "http://namespaceUri");

Note: There will be no further additional dom features added for 5.0. This
was an exception due to its usefulness in functionality.

Rob