From:             msw at seebi dot de
Operating system: windows xp prof
PHP version:      5.0.0b3 (beta3)
PHP Bug Type:     DOM XML related
Bug description:  getElementById doesn't return anything

Description:
------------
I'v used getElementById() to touch an element. It seems to me that
getElementById() doesn't return anything. 

Reproduce code:
---------------
<?php
$dom = new domdocument;
$t=$dom->load(dirname(__FILE__)."/news.xml");
if(!$dom) {
  echo "Error while parsing the document\n";
  exit;
}

$node=$dom->getElementById("486");
print ($node);
print("<br>".$node->nodeName);
?>

XML:

<?xml version="1.0" encoding="iso-8859-1"?>
<newsliste>
<news id="486" rubrik='xsl-fo' site="javaxml">
 <datum>14.08.2003</datum>
 <headline>Kleines Update von XEP</headline>
 <text>blablablabla</text>
 <Links>
  <Web-Adresse xml:link='simple' href='http://xep.xattic.com/'>
   <text>XEP 3.5.4</text>
  </Web-Adresse>
 </Links>
</news>
</newsliste>



Expected result:
----------------
The PHP code should print out the node name (news)

Actual result:
--------------
nothing

-- 
Edit bug report at http://bugs.php.net/?id=26813&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26813&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26813&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26813&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26813&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26813&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=26813&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=26813&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26813&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26813&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26813&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26813&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26813&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26813&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26813&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26813&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26813&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26813&r=float

Reply via email to