#23326 [Opn->Csd]: DomNode->append_child() does not append attribute nodes
| From: | chregu@php.net | Date: | Fri, 25 Apr 2003 08:59:02 +0000 |
| Subject: | #23326 [Opn->Csd]: DomNode->append_child() does not append attribute nodes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-38352@lists.php.net to get a copy of this message | ||
ID: 23326
Updated by: chregu@php.net
Reported By: markus dot pfefferle at web dot de
-Status: Open
+Status: Closed
Bug Type: DOM XML related
Operating System: Windows 2000
PHP Version: 4CVS-2003-04-24 (stable)
New Comment:
isn't implemented
you have to use $element->set_attribute_node()
which only is available in CVS HEAD. You could try the php_domxml.dll
from the latest cvs-snapshot
Previous Comments:
------------------------------------------------------------------------
[2003-04-24 08:18:16] markus dot pfefferle at web dot de
This works:
$document = domxml_new_doc('1.0');
$test = $document->append_child($document->create_element('test'));
$test->set_attribute('key', 'value');
echo htmlspecialchars($document->dump_mem(1));
This does not:
$document = domxml_new_doc('1.0');
$test = $document->append_child($document->create_element('test'));
$test->append_child($document->create_attribute('key', 'value'));
echo htmlspecialchars($document->dump_mem(1));
Also doesn't work on 4.3.1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23326&edit=1