This sounds reasonable.  XML can take strings which it will then parse, so doing it as a String makes sense to me.

 


From: [email protected] [mailto:[email protected]] On Behalf Of Xavi Beumala
Sent: Wednesday, November 01, 2006 11:58 AM
To: [email protected]
Subject: Re: [flexcoders] Using CDATA in XML objects in Flex 2

 

Hi Andrew,

today I've just sent the same question... Right now I've solved it in a similar way, but I think should be a better way...

Here's a copy of my previous post:

For example if I want to get an XML like this:

<simpleChoice identifier="I0001"><![CDATA

[hello <em>world</em>]]></simpleChoice>

I've tried things like:

var node:XML = <simpleChoice identifier={identifier}><![CDATA[{choice.text}]]></simpleChoice>

But this way I receive:

<simpleChoice identifier="I0001"><<![CDATA[{ choice.text}]]></simpleChoice> because {choice.text} is not being processed.

Any suggestion?

Best
X.

 

On 11/1/06, landrew65 <[EMAIL PROTECTED]com> wrote:

All,

I am building an app in Flex 2, and I need to send complex XML data from
my Flex client to my server-side application.  I need to encapsulate
some of the data in <![CDATA[ ]]> tags, but I cannot use the CDATA tag
inside a Flex script block.  To solve this problem, I created a simple
function that adds CDATA tags to the appropriate XML nodes in real time
by using this function:

private function addCDATA(node:String) :String {
         return "<![CDATA["+node+"]]>";
}

Is this the best solution?  I'd love to hear ways that other people have
solved it.

Andrew





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:flexcoders-digest@yahoogroups.com
    mailto: flexcoders-fullfeat[EMAIL PROTECTED].com

<*> To unsubscribe from this group, send an email to:
    flexcoders-unsubscr[EMAIL PROTECTED]com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

 

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to