Bug #18200 Updated: xpath_eval should return a reference to the DOM node and not a copy

From: Date: Sat, 06 Jul 2002 18:23:38 +0000
Subject: Bug #18200 Updated: 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-13323@lists.php.net to get a copy of this message
ID: 18200 Updated by: derick@php.net Reported By: lrargerich@yahoo.com Status: Open -Bug Type: DOM XML related +Bug Type: Feature/Change Request Operating System: All PHP Version: 4.2.1 New Comment: reclassify Previous Comments: ------------------------------------------------------------------------ [2002-07-06 14:06:51] lrargerich@yahoo.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

« previous php.bugs (#13323) next »