note 19659 added to function.xml-set-character-data-handler
| From: | waldo at wh-e dot com | Date: | Thu, 07 Mar 2002 02:52:43 +0000 |
| Subject: | note 19659 added to function.xml-set-character-data-handler | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-27446@lists.php.net to get a copy of this message | ||
Here's a way to strip all the spaces between tags in an xml document.
//strip white space between tags
$data=eregi_replace(">"."[[:space:]]+"."<","><",$data);
So this:
<house>
<garage>
<car>Waldo</car>
</garage>
</house>
would be changed to:
<house><garage><car>Waldo</car></garage></house>
It was useful to me. Maybe you too?
--
http://www.php.net/manual/en/function.xml-set-character-data-handler.php
http://master.php.net/manage/user-notes.php?action=edit+19659
http://master.php.net/manage/user-notes.php?action=delete+19659
http://master.php.net/manage/user-notes.php?action=reject+19659