#26849 [Opn]: domXPath object returns array instead of nodeList
| From: | adam at trachtenberg dot com | Date: | Thu, 08 Jan 2004 21:22:54 +0000 |
| Subject: | #26849 [Opn]: domXPath object returns array instead of nodeList | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-53012@lists.php.net to get a copy of this message | ||
ID: 26849
User updated by: adam at trachtenberg dot com
Reported By: adam at trachtenberg dot com
Status: Open
Bug Type: DOM XML related
Operating System: *
PHP Version: 5CVS-2004-01-08 (dev)
New Comment:
That should be domXpath::query(), but you get the point.
:)
Previous Comments:
------------------------------------------------------------------------
[2004-01-08 16:18:28] adam at trachtenberg dot com
Description:
------------
The domXPath object still returns nodes in an array
instead of as a nodeList object.
Reproduce code:
---------------
$dom = new domDocument::load($xml);
$xpath = new domXPath($dom);
$results = $xpath->query('/');
var_dump($results);
Expected result:
----------------
object(domnodelist)#14 (0) {
...
}
Actual result:
--------------
array(1) {
...
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26849&edit=1