note 49832 deleted from ref.xml by bjori
| From: | bjori@php.net | Date: | Mon, 09 Oct 2006 11:16:06 +0000 |
| Subject: | note 49832 deleted from ref.xml by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-118298@lists.php.net to get a copy of this message | ||
Note Submitter: php at NOSPAM dot stratos-online dot nl
----
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.