1 Reply Latest reply on Oct 27, 2008 1:45 AM by SujitG

    How to convert String to XML with whitespace in textnode by HTTPService

    arrowCai
      Dear everyone,
      Now I need to convert a xml String to XML object of AS HTTPService, which DONOT ignore the whitesapce in node. For example:
      a.xml:
      <foo><a> 1 </a></foo>
      as code:
      var xmlReturnString:String = httpService.lastResult.toString();
      Alert.show(xmlReturnString); <-- WhiteSpace is reserved -->
      XML.ignoreWhitespace = false; <-- According to help, this set can solve the problem, but.. -->
      var xml:XML = XML(xmlReturnString);
      Alert.show(String(xml)); <-- WhiteSpace is truncated-->

      How to keep the space in XML object?
      Any suggection is appreciated, thank you!