1 Reply Latest reply on Jan 13, 2007 1:02 PM by mburbidg

    List Control and XML data

      I am trying to display XML data from a HTTPReqeust in a list control. Here's my mxml:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="aircrafts.send()">

      import mx.collections.XMLListCollection;
      import mx.rpc.events.ResultEvent;

      private var aircraftDp:XMLList;

      private function aircraftXMLHandler(event:ResultEvent):void
      aircraftDp = event.result.aircraft;

      <mx:HTTPService id="aircrafts"
      url=" http://localhost:8080/flysafe/aircrafts"

      <mx:List x="10" y="53" dataProvider="{aircraftDp}"></mx:List>

      The REST service returns the following XML document:

      <aircraft id='0' label='Cessna' href=' http://localhost:8080/flysafe/aircrafts/0'/>
      <aircraft id='1' label='Piper' href=' http://localhost:8080/flysafe/aircrafts/1'/>

      The List control is empty. I cannot figure out how to get the right connection between the data provider and the xml returned by the HTTPRequest.