title: How can I encode reserved XML characters in actionscript?
body: <p>I am writing a business app in Flex that uses web services to communicate with a middle tier.  The web services accept and return messages in XML format.  In many cases, I need to be able to allow the user to type something like the following into a field in the app, which in turn will be added as an element in an XML payload bound for a SOAP web service (without the quotes):</p>
  
  <p>"account balance &lt; 1000"</p>
  
  <p>The Flex parser chokes when trying to serialize an element with this in the Text node (e.g., account balance &lt; 1000.  So I need some way to encode the "&lt;" to "&lt;" prior to doing the XML serialization.  In addition, I would prefer a generic way to do this, such as with an attribute on the service declaration, since I have over 40 services that must support this kind of input.  Any ideas? </p>