php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17638 set_attribute_node doesn't work
Submitted: 2002-06-07 06:26 UTC Modified: 2003-04-03 04:22 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: bigredlinux at yahoo dot com Assigned:
Status: Closed Package: DOM XML related
PHP Version: 4.2.1 OS: linux 2.4.19
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
13 + 20 = ?
Subscribe to this entry?

 
 [2002-06-07 06:26 UTC] bigredlinux at yahoo dot com
The function set_attribute_node() does not work.  I have tried to retrieve an attribute from elsewhere in the document and then set the attribute in a new element node...and finding that perhaps I had to clone the node, I tried that as well with no luck.  Then I just tried to set_attribute_node() and passing it the result of create_attribute() and that didn't work.  So no test cases can show that this function actually adds an attribute_node to the tree.  Since append_child() is restricted for appending attributes, we are stuck with using only set_attribute().

Here is the test case:

$domelement->set_attribute_node($xml->create_attribute('foo', 'bar'));

result is that the tree is not affected.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-01 10:05 UTC] chregu@php.net
The function seems to be not really implemented, therefore I added  DOM_NOT_IMPLEMENTED() macro there for giving at least a warning. 

Someone will implement it later :)

chregu
 [2003-04-03 04:22 UTC] chregu@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 27 10:01:30 2024 UTC