3 Replies Latest reply on Apr 28, 2008 8:39 PM by flashharry!

    Replace XML

    Cloudesk

      I want to replace two parameters on the same replace, the idea it's print in a textArea a XML file from a webService, went i get the XML, but this file print &lt; by < and &gt; by >.
      Like this:

      &lt;Table&gt;
      &lt;user_id&gt;1&lt;/user_id&gt;
      &lt;server_id&gt;1&lt;/server_id&gt;
      &lt;server_name&gt;Google&lt;/server_name&gt;
      &lt;ip&gt;216.239.51.99&lt;/ip&gt;
      &lt;/Table&gt;

      i used the replace but just change the first &lt; and the other not, with this code i do it:

      var myPattern:RegExp = /&lt;/, /&gt;/ig
      var myString:String = WS.GetServerList.lastResult.toXMLString();
      myTextArea.text = myString.replace(myPattern, "< , >");

      Does anyone know how to fix this? and print the "<" ">" instead of "&lt;" "&gt;".