|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26849 domXPath object returns array instead of nodeList
Submitted: 2004-01-08 16:18 UTC Modified: 2004-01-10 06:47 UTC
From: adam at trachtenberg dot com Assigned:
Status: Closed Package: DOM XML related
PHP Version: 5CVS-2004-01-08 (dev) OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: adam at trachtenberg dot com
New email:
PHP Version: OS:


 [2004-01-08 16:18 UTC] adam at trachtenberg dot com
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('/');

Expected result:
object(domnodelist)#14 (0) {

Actual result:
array(1) {


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-08 16:22 UTC] adam at trachtenberg dot com
That should be domXpath::query(), but you get the point. 
 [2004-01-10 06:47 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Sep 22 14:01:24 2023 UTC