Click to See Complete Forum and Search --> : No new lines using CDATA


mmendo
05-12-2009, 03:01 PM
Hello,

I'm not sure whether to post this here in the XML section or in the Flash section.

I have a Flash web template that dynamically pulls site content from an XML file. The pages of the website are in CDATA containers. Everything works really well except that I cannot get Flash to create new lines. Everything just runs together. I've tried the br and the p tags.

Is this something to do with the CDATA usage? I thought I read somewhere that no new paragraphs can be created within CDATA? Maybe that's wrong. Surely there must be some way to create new lines.

Here's the code:

<pageText><![CDATA[Sample text line 1<br>Sample text line 2]]></pageText>\r\n

The result in Flash is: Sample text line 1Sample text line 2

Thanks in advance for any help!

Charles
05-13-2009, 02:25 PM
I don't know squat about flash but if you want a hard return inside a CDATA section then just insert one:<pageText><![CDATA[Sample text line 1
Sample text line 2]]></pageText>
]]>