thanks, it was driving me crazy. I was expecting to see CDATA in the xml file at some point.
cheers, Diego.

Scott Hyndman wrote:

It will never print the CDATA tag, but it does perform the necessary escaping.

Scott

-----Original Message-----
From:   [EMAIL PROTECTED] on behalf of Diego Guebel
Sent:   Wed 11/2/2005 5:31 PM
To:     Flashcoders mailing list
Cc:     
Subject:        Re: [Flashcoders] createTextNode with CDATA
jobe, it seems I'm doing something wrong.
here is my code:
__xmlString += "<attr id=\"" + obj.screenInputValues[i].id + "\" name=\"" + obj.screenInputValues[i].name + "\"><![CDATA[\" + obj.screenInputValues[i].value + "]]></attr>";

this is an ouptput example:
<attr id="731" name="learn">1</attr>

it prints all the values but not the CDATA around the "1".

do I miss something?
Cheers, Diego.

Jobe Makar wrote:

In Flash I've always opted to create XML as a string, and then when I'm done do this:
var myXML:XML = new XML(theString);

If you do it that way then CDATA definately works.

Jobe Makar
http://www.electrotank.com
http://www.electro-server.com
phone: 919-609-0408
mobile: 919-610-5754
fax: 919-341-8104
----- Original Message ----- From: "Chris Allen" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Wednesday, November 02, 2005 4:57 PM
Subject: Re: [Flashcoders] createTextNode with CDATA


There is no way to create an actual CDATA node in Flash, at least not
with Version 8 or lower.  You have to resort to escaping the string so
that it doesn't have invalid characters or not use XMLNode for this.

-Chris

On 11/2/05, Diego Guebel <[EMAIL PROTECTED]> wrote:

hey guys,
I want to create a xml node with CDATA, I'm doing in this way:

var temp:XMLNode = doc.createTextNode("<![CDATA[" +
obj.screenInputValues[i].value + "]]>");

the issue is that it prints &lt; in the output.
<attr name="learn" id="731">&lt;![CDATA[some text]]&gt;</attr>

any pointer on this,
cheers, Diego.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



------------------------------------------------------------------------

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to