From: msw at seebi dot de
Operating system: Windows XP Prof
PHP version: 4.3.4
PHP Bug Type: DOM XML related
Bug description: is_blank_node() returns nothing
Description:
------------
I've checked out DOM method is_blank_node(), which checks whether a node
is empty or not. The methode is_blank_node seems to me not working
correctly and returns nothing.
Reproduce code:
---------------
XML-Code with empty nodes:
<?xml version="1.0"?>
<userliste>
<user>
<name/>
<passwort/>
<datum/>
<zeit/>
</user>
</userliste>
PHP-Code to read and to use is_blank_node:
<?php
if(!$dom = domxml_open_file("e:/htdocs/user.xml")) {
echo "Error while parsing the document\n";
exit;
}
$root=$dom->document_element();
print($root->is_blank_node());
$node=$dom->get_elements_by_tagname("name");
print ($node[0]->node_name());
print ($node[0]->is_blank_node());
if ($node[0]->is_blank_node()) {
print("empty");
}
?>
Expected result:
----------------
The PHP-code checks whether <name> is empty or not. I'v expected that
is_blank_node returns true.
Actual result:
--------------
is_blank_node returns nothing.
--
Edit bug report at http://bugs.php.net/?id=26499&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26499&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26499&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26499&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26499&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26499&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26499&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26499&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26499&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26499&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26499&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26499&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26499&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26499&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26499&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26499&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26499&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26499&r=float