Re: [Flashcoders] How do I create a CDATA node using AS2?
What I want to do is something like:class one { var x:XML; function addNode(parent:xmlNode) { var child:XMLNode=new XMLNode(3,!CDATA[+stuff+]]); parent.appendChild(child); } function go():String { return x.toString();} But what happens is the child node toString() produces lt;...So when go() runs I get something like parentlt;... What I want to do is have an XML object output a string that contains a CDATA node. The above example is greatly simplified. I actually have a class hierarchy, where the classes extend what is stored in the XML, and one of the derived classes needs to store CDATA. Thanks. --- On Wed, 5/11/11, Karl DeSaulniers k...@designdrumm.com wrote: From: Karl DeSaulniers k...@designdrumm.com Subject: Re: [Flashcoders] How do I create a CDATA node using AS2? To: Flash Coders List flashcoders@chattyfig.figleaf.com Date: Wednesday, May 11, 2011, 10:25 PM In the xml node itself, the nodes content wrapped CDATA in the XML or the result of that node wrapped in CDATA in flash? xmlnode id=![CDATA[nodename]] xmlnode or xmlnode id=nodename ![CDATA[noderesult]] xmlnode or var result = ![CDATA[+this.xmlNode.firstchild.childNodes[i].childNodes[0].firstChild.nodeValue+]]; HTH, Karl On May 11, 2011, at 9:08 PM, jimlaf...@yahoo.com wrote: I am using an xml object and need to have a cdata node written out when I use toString() on the XML object On May 11, 2011, at 7:50 PM, Karl DeSaulniers k...@designdrumm.com wrote: ![CDATA[hello]] On May 11, 2011, at 6:45 PM, Jim Lafser wrote: Anyone know how to create a CDATA node when writing XML in AS2?I tried Google. I looked in the books I've got.I tried extending XMLNode.I've had no success. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do I create a CDATA node using AS2?
maybe?? function go():String { return(!CDATA[+x.toString()+]]); } sry, guessing at this point. Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] How do I create a CDATA node using AS2?
Jim, I just did something similar, but in AS3, to insert some CDATA into some preexisting xml. var createCDATA:Function = function(cont:String):XML{ return new XML(![CDATA[ + cont + ]]); } var _item:XML = item{createCDATA(some text based content)}/item; - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do I create a CDATA node using AS2?
![CDATA[hello]] On May 11, 2011, at 6:45 PM, Jim Lafser wrote: Anyone know how to create a CDATA node when writing XML in AS2?I tried Google. I looked in the books I've got.I tried extending XMLNode.I've had no success. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do I create a CDATA node using AS2?
I am using an xml object and need to have a cdata node written out when I use toString() on the XML object On May 11, 2011, at 7:50 PM, Karl DeSaulniers k...@designdrumm.com wrote: ![CDATA[hello]] On May 11, 2011, at 6:45 PM, Jim Lafser wrote: Anyone know how to create a CDATA node when writing XML in AS2?I tried Google. I looked in the books I've got.I tried extending XMLNode.I've had no success. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do I create a CDATA node using AS2?
In the xml node itself, the nodes content wrapped CDATA in the XML or the result of that node wrapped in CDATA in flash? xmlnode id=![CDATA[nodename]] xmlnode or xmlnode id=nodename ![CDATA[noderesult]] xmlnode or var result = ![CDATA[+this.xmlNode.firstchild.childNodes [i].childNodes[0].firstChild.nodeValue+]]; HTH, Karl On May 11, 2011, at 9:08 PM, jimlaf...@yahoo.com wrote: I am using an xml object and need to have a cdata node written out when I use toString() on the XML object On May 11, 2011, at 7:50 PM, Karl DeSaulniers k...@designdrumm.com wrote: ![CDATA[hello]] On May 11, 2011, at 6:45 PM, Jim Lafser wrote: Anyone know how to create a CDATA node when writing XML in AS2?I tried Google. I looked in the books I've got.I tried extending XMLNode.I've had no success. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do I create a CDATA node using AS2?
In the xml node itself, the nodes content wrapped CDATA in the XML or the result of that node wrapped in CDATA in flash? xmlnode id=![CDATA[nodename]] xmlnode CDATA is not valid for XML attribute values. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do I create a CDATA node using AS2?
Ooops, sorry. Minus that one then. :) Karl On May 11, 2011, at 9:35 PM, Dave Watts wrote: In the xml node itself, the nodes content wrapped CDATA in the XML or the result of that node wrapped in CDATA in flash? xmlnode id=![CDATA[nodename]] xmlnode CDATA is not valid for XML attribute values. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders