Re: Problem of characters with xml_parse
| From: | Analysis & Solutions | Date: | Tue, 30 Jul 2002 15:20:53 +0000 |
| Subject: | Re: Problem of characters with xml_parse | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-110351@lists.php.net to get a copy of this message | ||
On Tue, Jul 30, 2002 at 05:12:25PM +0200, Sebastien Mole wrote:
> but when I try to parse characters such as chr(#x0001) or
chr(#x001F) (or others) the parser returns me an error
Line wrapping... "What a concept."
In my PHP XML parsing
tutorial, http://www.analysisandsolutions.com/code/phpxml.htm,
I use the following preg to clean out those nasty characters:
# Remove all non-visible characters except SP, TAB, LF and CR.
$Contents = preg_replace('/[^\x20-\x7E\x09\x0A\x0D]/', "\n", $Contents);
--Dan
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
sqlsolution.info | layoutsolution.info | formsolution.info
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409