Re: Clean data / text for XML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, January 31, 2006 10:21 am, Russell Jones wrote:
> Any good classes or scripts out there to just clean data that will be
> placed
> into XML? I always have a problem with random "tokens" ruining XML and
> I
> would prefer if I could just find a way to clean all the junk out
> before
> putting it into an xml file.

Not an XML expert, but...

I think wrapping everything in a CDATA should be pretty safe...

You could also base64_encode (or similar) everything before you put it
into the XML, and undo that at the other end, I suppose.

I've also found that different XML engines will choke on different
things -- Firefox will complain about XML that "works" in nusoap
and/or PHP5 SOAP.

XML usually turns out to be a lot more painful than it seems like it
should, for me at least, unless the original problem was so simplistic
and trival that XMl was overkill in the first place...

YMMV

-- 
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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux