1 Reply Latest reply on Nov 27, 2006 10:39 AM by Bill Sahlas

    HTTP to xml and back

      I've been playing with a project that was all html/php based. I was able to set up a nice Flex 2 IU and hook it up to my back end database without much trouble. I get xml records from an http dataprovider and have some text fields and some datagrids. What I want to do, though, is be able to update the xml record and push it back over http. The event.result I get back from the dataprovider is type Object. I was thinking that I ought to be able to coerce it into an XML object and bind my UI to it so I could add and remove datagrid items from the XML.

      I can't seem to figure out how to do anything with the event.result other than bind my UI to it. So how can I take xml received over http and make it into an XML object I can bind to and change ?

      Here's what my provider and callback look like:
      url=" http://xxx.xxx.com/testdata.php"
      <mx:request xmlns="">

      import mx.utils.XMLUtil
      var xmlData:XML;
      import mx.rpc.events.ResultEvent;
      import mx.utils.StringUtil;
      public function getListing() : void {
      public function listingResult(event:ResultEvent) : void {
      if(StringUtil.trim(String(event.result)) == String("FAILED"))
      xmlData = new XML(event.result);