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?






Reply via email to