#18200 [Opn->Csd]: xpath_eval should return a reference to the DOM node and not a copy
| From: | chregu@php.net | Date: | Fri, 27 Aug 2004 08:20:46 +0000 |
| Subject: | #18200 [Opn->Csd]: xpath_eval should return a reference to the DOM node and not a copy | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-65331@lists.php.net to get a copy of this message | ||
ID: 18200
Updated by: chregu@php.net
Reported By: lrargerich at yahoo dot com
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
Operating System: All
PHP Version: 4.2.1
New Comment:
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at
http://www.php.net/downloads.php
This is certainly fixed in PHP 5, don't know about PHP 4, but we won't
add features to PHP 4 anyway
Previous Comments:
------------------------------------------------------------------------
[2002-07-06 14:23:37] derick@php.net
reclassify
------------------------------------------------------------------------
[2002-07-06 14:06:51] lrargerich at yahoo dot com
Now, the xpath_eval function returns a copy of the DOM nodes
in the nodeset array, in my opinion the nodeset should be
an array of references to DOMNodes in the tree. In this way
if you change a node in the result set the document changes.
If you find this problematic for existing applications you
might want to add an aditional parameter to xpath_eval allowing the
user to indicate if he wants references or
copies back.
However in my opinion xpath_eval should return references
and if the user wants a copy he just makes the copy himself.
This change allows a lot of interesting features to XML editing using
Xpath selectors from PHP.
This will allow, for example, an easy implementation of XUpdate using
the DOM extension.
Thanks for reading my suggestion.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18200&edit=1