note 40456 deleted from function.domdocument-get-elements-by-tagname by bjori
| From: | bjori@php.net | Date: | Wed, 03 Jan 2007 08:00:02 +0000 |
| Subject: | note 40456 deleted from function.domdocument-get-elements-by-tagname by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-121227@lists.php.net to get a copy of this message | ||
Note Submitter: nick dot dixon at NOSPAM dot mi-int dot com
----
For nukebagdad: in PHP versions below 4.3.0, get_elements_by_tagname() is not recursive; that is, it
will only look at immediate children inside the element, and will not look any deeper in the tree.
So if you have a document:
<root>
<a>
<b>
<c>
</c>
</b>
</a>
</root>
calling:
$a->get_elements_by_tagname("b")
returns an array containing the element <b>, as expected.
But if you try:
$a->get_elements_by_tagname("c")
you will get an empty array (I'm seeing this in 4.2.2).
The method was made recursive in 4.3.0RC4 (see http://bugs.php.net/bug.php?id=20948)