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 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 does it preserve the
> whitespace.
> 
> --- Nils Millahn <[EMAIL PROTECTED]> wrote:
> 
> > 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    ";
> > >    x.b = "   b    ";
> > >    x.c = "   c    ";
> > >    trace("x=" + x.toXMLString());
> > >
> > > The output is:
> > >
> > > x=<myXML>
> > >   <a>a</a>
> > >   <b>b</b>
> > >   <c>c</c>
> > > </myXML>
> > >
> > >
> > > Can anyone tell me how to preserve the leading and trailing whitespace
> > in
> > > the elements a, b and c?
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > 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
> > >
> > >
> > >
> > >
> > >
> > >   
> > 
> > 
> 
> 
> 
> 



Reply via email to