note 49832 added to ref.xml

From: Date: Wed, 09 Feb 2005 20:48:06 +0000
Subject: note 49832 added to ref.xml
Groups: php.notes 
Request: Send a blank email to php-notes+get-84750@lists.php.net to get a copy of this message
the XML_OPTION_SKIP_WHITE din't work for me. Or i don't fully understand what it is supposed to do. either way, if you want to get rid of all access white space, new lines and tabs in your formatted XML, the following code snippet might help. <?php $buffer = preg_replace('/\>(\n|\r|\r\n| |\t)*\</','><',$buffer); ?> i'm sure it isn't effecient, but atleast it works. (for me) however when you would be parsing cdata with sgml style tags in them. (< >) I'm sure it will horribly mess it up. ---- Manual Page -- http://www.php.net/manual/en/ref.xml.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49832 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49832&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49832&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49832&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49832&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49832&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49832&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#84750) next »