#38117 [Fbk->Opn]: php 5.1.2 dom object preserveWhiteSpace
| From: | protano at wp dot pl | Date: | Tue, 18 Jul 2006 07:45:57 +0000 |
| Subject: | #38117 [Fbk->Opn]: php 5.1.2 dom object preserveWhiteSpace | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-99559@lists.php.net to get a copy of this message | ||
ID: 38117
User updated by: protano at wp dot pl
Reported By: protano at wp dot pl
-Status: Feedback
+Status: Open
Bug Type: DOM XML related
Operating System: windows
PHP Version: 5.1.4
New Comment:
// *** WINDOWS with error ***/
DOM/XML enabled
DOM/XML API Version 20031129
libxml Version 2.6.22
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Schema Support enabled
RelaxNG Support enabled
// *************************** //
// *** LINUX works fine *** //
DOM/XML enabled
DOM/XML API Version 20031129
libxml Version 2.6.16
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Schema Support enabled
RelaxNG Support enabled
// **************************** //
Previous Comments:
------------------------------------------------------------------------
[2006-07-17 07:07:23] chregu@php.net
Are you using the same libxml2 versions on both systems? Maybe
that's the reason...
------------------------------------------------------------------------
[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