[flexcoders] Preserving whitespace in XML nodes

2008-01-22 Thread Dave Glasser
I've tried using the static XML.ignoreWhitespace property to solve this problem. Not only does it not work, but I don't want the setting applied globally. When I run this code: var x:XML = myXML/; x.a =a; x.b =b; x.c =c; trace(x= + x.toXMLString()); The

Re: [flexcoders] Preserving whitespace in XML nodes

2008-01-22 Thread Nils Millahn
Have you tried using a CDATA around them? - Nils. Dave Glasser wrote: I've tried using the static XML.ignoreWhitespace property to solve this problem. Not only does it not work, but I don't want the setting applied globally. When I run this code: var x:XML = myXML/; x.a =a;

Re: [flexcoders] Preserving whitespace in XML nodes

2008-01-22 Thread Dave Glasser
That doesn't seem to work either. Perhaps I'm not doing it right, but the output is identical with this code: var x:XML = myXML/; x.a = new XML( ![CDATA[a]]); x.b =b; x.c =c; trace(x= + x.toXMLString()); It doesn't show the CDATA section in the output, nor

Re: [flexcoders] Preserving whitespace in XML nodes

2008-01-22 Thread Dave Glasser
P.S., in the CDATA section below, the a character has four spaces on either side, but it might not appear that way in HTML-based mail readers. --- Dave Glasser [EMAIL PROTECTED] wrote: That doesn't seem to work either. Perhaps I'm not doing it right, but the output is identical with this

Re: [flexcoders] Preserving whitespace in XML nodes

2008-01-22 Thread Dave Glasser
FTR, I found that setting XML.prettyPrinting = false fixes this, but this is not a workaround I can use. I'm pretty sure this behavior does not comply with ECMA-357, so I logged a bug: http://bugs.adobe.com/jira/secure/IssueNavigator.jspa?mode=hiderequestId=10201 --- Dave Glasser [EMAIL