ID: 38117 Updated by: [EMAIL PROTECTED] Reported By: protano at wp dot pl -Status: Open +Status: Bogus Bug Type: DOM XML related Operating System: windows PHP Version: 5.1.4 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php preserveWhiteSpace has no effect using loadHTML() - only XML load methods - so behavior is due to different libxml2 versions (looks like behavior was fixed with newer version) Previous Comments: ------------------------------------------------------------------------ [2006-07-18 07:45:56] protano at wp dot pl // *** 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 // **************************** // ------------------------------------------------------------------------ [2006-07-17 07:07:23] [EMAIL PROTECTED] Are you using the same libxml2 versions on both systems? Maybe that's the reason... ------------------------------------------------------------------------ [2006-07-17 06:34:59] [EMAIL PROTECTED] 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
