note 38030 added to function.domdocument-get-elements-by-tagname
| From: | jon at hiveminds dot net | Date: | Fri, 05 Dec 2003 10:49:37 +0000 |
| Subject: | note 38030 added to function.domdocument-get-elements-by-tagname | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-61441@lists.php.net to get a copy of this message | ||
Warning to win32 users: It appears that use of the wildcard argument to this function (e.g.
<?php
$alltags = $domdoc->get_elements_by_tagname("*");
?>
) to return a collection of all DomElements in a document, which worked in php4.3.0-4.3.3, is broken
in php4.3.4 for Windows. Upgrading broke numerous scripts depending on this behaviour, which
returned to normal as soon as I rolled back to 4.3.3-win32.
I had intended to offer a workaround using child_nodes(), but found problems with this also.
Therefore my suggested workarounds are either (a) don't upgrade to 4.3.4 if you're running
this extension on Windows and are depending on the wildcard behaviour or (b) rewrite your code so as
to use actual tagnames
The wildcard usage is per the W3C DOM spec, so hopefully this will be fixed and available again in
4.3.5.
----
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+38030
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38030&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38030&report=yes
Search -- http://master.php.net/manage/user-notes.php