Re: [PHP] XML Filters for illegal characters

2005-01-06 Thread Richard Lynch
Jones, Douglas 1 wrote:
 I'm wondering if anyone knows of a filter that can take data to be wrapped
 in XML tags and filter this data encoding any illegal XML characters or,
 if they cannot be encoded, remove them.  The problem I have is a database
 that contains text that must be wrapped in XML.  Some of this text has
 illegal characters in it (probably copied from MS Word).  Some of the
 characters that keep popping up are not very frequently used, so I'm
 hoping whatever filters get suggested, they can simply strip out these
 characters if they cannot encode them.

In the user-contributed section of the PHP manual, under htmlentities, I
think, there is a nice chunk of code that tells you how to replace all
those stupid non-ASCII Microsuck Word characters with the HTML equivalent
that will be closest to what it was in Word.

Very very nice.

It might not be in htmlentities, though -- You'll have to dig around for
it...

If I could just remember which project I pasted that into, I'd just post
it again :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] XML Filters for illegal characters

2005-01-05 Thread Jones, Douglas 1
Hello,

I'm wondering if anyone knows of a filter that can take data to be wrapped in 
XML tags and filter this data encoding any illegal XML characters or, if they 
cannot be encoded, remove them.  The problem I have is a database that contains 
text that must be wrapped in XML.  Some of this text has illegal characters in 
it (probably copied from MS Word).  Some of the characters that keep popping up 
are not very frequently used, so I'm hoping whatever filters get suggested, 
they can simply strip out these characters if they cannot encode them.

thanks for your help.


--
Doug Jones
Co-Op Web Developer
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] XML Filters for illegal characters

2005-01-05 Thread John Holmes
Jones, Douglas 1 wrote:
I'm wondering if anyone knows of a filter 
 that can take data to be wrapped in XML tags
 and filter this data encoding any illegal XML characters
Have you tried htmlentities()?
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals  www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] XML Filters for illegal characters

2005-01-05 Thread Jones, Douglas 1
Yes, I have tried htmlentities.  Unfortunately it doesn't seem to be catching 
the characters that are plaguing my program.


--
Doug Jones
Co-Op Web Developer
[EMAIL PROTECTED]


-Original Message-
From: John Holmes [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 05, 2005 11:32 AM
To: Jones, Douglas 1
Cc: php-general@lists.php.net
Subject: Re: [PHP] XML Filters for illegal characters


Jones, Douglas 1 wrote:
 I'm wondering if anyone knows of a filter 
  that can take data to be wrapped in XML tags
  and filter this data encoding any illegal XML characters

Have you tried htmlentities()?

-- 

---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals  www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php