|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25900 DomDocument->get_elements_by_tagname('tagName') doesn't find elements
Submitted: 2003-10-18 10:52 UTC Modified: 2003-10-20 11:42 UTC
From: Martin dot Honnen at arcor dot de Assigned:
Status: Closed Package: DOM XML related
PHP Version: 4.3.3 OS: Windows XP
Private report: No CVE-ID:
 [2003-10-18 10:52 UTC] Martin dot Honnen at arcor dot de
Testing with PHP 4.3.3 on Windows and DOMXML setup as

DOM/XML 	enabled
DOM/XML API Version 	20020815
libxml Version 	20507
HTML Support 	enabled
XPath Support 	enabled
XPointer Support 	enabled
DOM/XSLT 	enabled
libxslt Version 	1.0.30
libxslt compiled against libxml Version 	2.5.7

I encounter a problem with get_elements_by_tagname called on the document node, it doesn't find elements in the document.
Example XML document is at
a test PHP program demonstrating the problem is at

Reproduce code:

Expected result:
The test program calls get_elements_by_tagname on the document node and calls the method again on the documentElement node, both calls should find the same elements (and number of elements, in the example one element).

Actual result:
get_elements_by_tagname called on the document node doesn't find any elements while the method called on the documentElement node finds one element.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-20 11:42 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Wed Dec 02 06:01:39 2015 UTC