php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17318 dump_node() and node_value() don't work for attribute nodes
Submitted: 2002-05-20 15:31 UTC Modified: 2002-06-07 11:02 UTC
From: lrargerich at yahoo dot com Assigned:
Status: Closed Package: DOM XML related
PHP Version: 4.2.1 OS: Windows
Private report: No CVE-ID: None
 [2002-05-20 15:31 UTC] lrargerich at yahoo dot com
If you have a DOM node that is an attribute node
node_value() function doesn't return the attribute
value.
The dump_node() is also returning something incorrect
for an attrbute node <attname>attvalue</attname>

Luis

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-23 03:28 UTC] chregu@php.net
Mmmh, what would you expect from a Attribute-Node-Dump? 'attname="attvalue"'? Or just nothing to be returned? The first would make more sense IMHO...

The node_value() issue will be fixed soon.
 [2002-06-07 06:40 UTC] bigredlinux at yahoo dot com
I temporary work around for node_value() is just to use the value() function (forget the node_ part).  Again, keep your eyes peeled for when it is fixed though.

As of version 4.2.1 of php with domxml, the dump_node for attribute returns

foo="bar"

for the attribute in the tree as
<doc foo="bar">

which is what would be expected.  This bug is closed if the node_ part is just added to the php_alias function.
 [2002-06-07 11:02 UTC] jtate@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version 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.
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 06 15:01:31 2024 UTC