ID:               48504
 User updated by:  ikrabbe dot ask at web dot de
 Reported By:      ikrabbe dot ask at web dot de
-Status:           Open
+Status:           Bogus
 Bug Type:         DOM XML related
 Operating System: Linux
 PHP Version:      5.2.9
 New Comment:

Sorry, I misspelled the item: document_element is called
documentElement.


Previous Comments:
------------------------------------------------------------------------

[2009-06-09 10:53:32] ikrabbe dot ask at web dot de

Actually:
if ( !$xmldocu->document_element )
  echo "NULL Document";
reveals a NULL root node !  Thats actually a bug.  Please either
correct this behaviour or describe whats meant by "document_element" in
the documentation.

------------------------------------------------------------------------

[2009-06-09 10:48:36] ikrabbe dot ask at web dot de

Description:
------------
on
$xml="<a><b>abc</b><c/></a>";
$xmldoc = new DOMDocument();
$xmldoc->loadXML($xml);
I get for
echo "item 0=".$xmldoc->childNodes->item(0)->nodeName."\n";
echo "root =".$xmldoc->document_element->nodeName."\n";
the output:
item 0=a
root=
I assumed that document_element should be the same as
childNodes->item(0), so I assume that is a bug.


Reproduce code:
---------------
see above

Expected result:
----------------
see above

Actual result:
--------------
see above


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=48504&edit=1

Reply via email to