Re: How to create CDATA tags with XML_Serializer
| From: | Torsten Roehr | Date: | Wed, 12 Jan 2005 19:48:58 +0000 |
| Subject: | Re: How to create CDATA tags with XML_Serializer | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-16899@lists.php.net to get a copy of this message | ||
Hi Stephan,
"Stephan Schmidt" <schst@php.net> wrote in message
news:20050112191810.88310.qmail@pb1.pair.com...
> Hi,
>
> Torsten Roehr schrieb:
> > Hi,
> >
> > what is the best way to create CDATA when serializing an array into XML
with
> > XML_Serializer? If it's done manually by using a string like
> > <![CDATA[test]]> the < and > are converted to their respective html
special
> > chars. How can this be avoided? Applying html_entity_decode() as the
encode
> > function doesn't help as htmlspecialchars() seems to be applied
afterwards.
>
> Why do you need to create CData sections?
To include any kind of characters that should not be parsed as XML.
> This currently is not
> possible, you can add it as a feature request (in the bug tracker) and
> I'll implement this as soon as I have some time.
I'll do this. By the way, your package is excellent. Takes some time to find
the right options but then it works like a charm!
Thanks, Torsten