#31873 [NEW]: DOMDocument->preserveWhiteSpace not working correctly
| From: | becicka at aarongroup dot cz | Date: | Mon, 07 Feb 2005 17:44:39 +0000 |
| Subject: | #31873 [NEW]: DOMDocument->preserveWhiteSpace not working correctly | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-73605@lists.php.net to get a copy of this message | ||
From: becicka at aarongroup dot cz
Operating system:
PHP version: 5.0.3
PHP Bug Type: *XML functions
Bug description: DOMDocument->preserveWhiteSpace not working correctly
Description:
------------
$dom->saveXML() return:
<?xml version="1.0"?>
<a><B><C/>
</B></a>
instead of:
<?xml version="1.0"?><a><B><C/></B></a>
Reproduce code:
---------------
$dom = new DOMDocument;
$dom->preserveWhiteSpace = false;
$def = '
<a>
<B>
<C/>
</B>
</a>';
$dom->loadXML($def);
echo "<pre>";
echo htmlentities($dom->saveXML());
echo "</pre>";
Expected result:
----------------
$dom->saveXML() should return
<?xml version="1.0"?><a><B><C/></B></a>
Actual result:
--------------
<?xml version="1.0"?>
<a><B><C/>
</B></a>
--
Edit bug report at http://bugs.php.net/?id=31873&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31873&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31873&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31873&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31873&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31873&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31873&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31873&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31873&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31873&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31873&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31873&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31873&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31873&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31873&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31873&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31873&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31873&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31873&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31873&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31873&r=mysqlcfg