note 40456 added to function.domdocument-get-elements-by-tagname
| From: | nick dot dixon at NOSPAM dot mi-int dot com | Date: | Thu, 04 Mar 2004 12:04:46 +0000 |
| Subject: | note 40456 added to function.domdocument-get-elements-by-tagname | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-66232@lists.php.net to get a copy of this message | ||
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)
----
Manual Page -- http://www.php.net/manual/en/function.domdocument-get-elements-by-tagname.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+40456
Delete -- http://master.php.net/manage/user-notes.php?action=delete+40456&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+40456&report=yes
Search -- http://master.php.net/manage/user-notes.php