[Expat-discuss] CDATA and newlines
mark.williams at techop.co.uk
Thu Mar 24 17:50:00 CET 2005
> -----Original Message-----
> From: expat-discuss-bounces at libexpat.org
> [mailto:expat-discuss-bounces at libexpat.org] On Behalf Of Jani
> Pellikka jpellikk-at-ee.oulu.fi |Expat/1.0-Allow|
> Sent: 24 March 2005 11:36
> To: Mark Williams
> Subject: [Expat-discuss] CDATA and newlines
> Expat parser seems to remove all newlines and other
> white space from between the XML tags. I had understood
> that with CDATA tag all the material inside would be left
> as it were but even then the parser removes all newlines.
> Is there any way to preserve all the material inside CDATA
> tag untouched with Expat parser?
I had the same issue. Expat is correct -- newlines are not saved
in CDATA sections. My solution was to use normal text with character
escapes for the newlines.
More information about the Expat-discuss