Bug #17629 Updated: DomDocument->get_element_by_id still broken
| From: | schwier at bigfoot dot com | Date: | Wed, 12 Jun 2002 06:56:59 +0000 |
| Subject: | Bug #17629 Updated: DomDocument->get_element_by_id still broken | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-10212@lists.php.net to get a copy of this message | ||
ID: 17629
Updated by: schwier@bigfoot.com
Reported By: bigredlinux@yahoo.com
Status: Open
Bug Type: DOM XML related
Operating System: linux redhat 7.2
PHP Version: 4.2.1
New Comment:
The same on my platform (SuSE 7.3, PHP 4.2.1, libxml2.4.22). Compiled
from sources.
Workaround from Bug #16647 works well.
Previous Comments:
------------------------------------------------------------------------
[2002-06-06 14:01:19] bigredlinux@yahoo.com
Reopening this bug. I understand that the function should use the id
hash as built from reading the DTD, which this function now attempts to
do. However, now the result of get_element_by_id is NULL
Here is the output running the bleeding edge version of domxml from the
following code:
output: NULL
code:
<?php
$string = <<< _END
<!DOCTYPE html [ <!ATTLIST span id ID #REQUIRED> ]>
<html>
<head><title> Test </title></head>
<body>
<h1>Test</h1>
<span id="test">Foo</span>
</body>
</html>
_END;
$xml = domxml_open_mem($string);
$n = $xml->get_element_by_id("test");
var_dump($n);
?>
Clearly something is happening. If I run $xml->ids() I get an array of
one domnode, just as I would expect.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17629&edit=1