#38117 [Fbk]: php 5.1.2 dom object preserveWhiteSpace
ID: 38117
Updated by: chregu@php.net
Reported By: protano at wp dot pl
Status: Feedback
Bug Type: DOM XML related
Operating System: windows
PHP Version: 5.1.4
New Comment:
Are you using the same libxml2 versions on both systems? Maybe
that's the reason...
Previous Comments:
------------------------------------------------------------------------
[2006-07-17 06:34:59] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
------------------------------------------------------------------------
[2006-07-16 22:43:10] protano at wp dot pl
Description:
------------
In windows version 5.1.2 php dom->preserveWhiteSpace = false; does
not act correctly.
So as this option would not be put.
In PHP Version 5.0.5-Debian-0.8~sarge1 it works correctly.
Reproduce code:
---------------
$doc = new DOMDocument;
$doc->preserveWhiteSpace = false;
$doc->loadHTML($buffer);
$xpath = new DOMXPath($doc);
$query = '//html/body/td/b';
$entries = $xpath->query($query);
$data=$entries->item(1)->nodeValue;
Expected result:
----------------
whitespaces between tags(xml elements) should be ignored.
Actual result:
--------------
whitespaces between tags(xml elements) are't ignore.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38117&edit=1
Thread (5 messages)