var x:XML = new XML(<root></root>); var b:String = "a <foo>string</foo>/& <ie> lkj l"; x.appendChild(b); textarea.text = x.toXMLString();
does this work for you? it is for me. also what SDK FP version are you using? are you using as3corelib? there is an xmlutil.isvalid method that you can use On Thu, Aug 19, 2010 at 8:21 AM, pmorch <li...@morch.com> wrote: > > > I figured it out: > > > > new XML("<value>" + xmlEscape(string) + "</value>"); > > is better done as: > > > > new XML(<value>{string}</value>); > > See also: > http://stackoverflow.com/questions/1856726/how-do-you-encode-xml-safely-with-actionscript-3/ > > >