Get XML from Php
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> import mx.collections.ArrayCollection; import mx.controls.Alert; import mx.rpc.events.ResultEvent; [Bindable] private var vendorData:ArrayCollection; private function resultHandler(event:ResultEvent):void { vendorData = event.result.vendors.vendor as ArrayCollection; } </mx:Script> <mx:HTTPService id="phpService" url="XML.php" result="resultHandler(event)"/> <mx:Button label="Get XML" click="phpService.send()"/> <mx:DataGrid dataProvider="{vendorData}" width="400"/> </mx:Application> <!-- ReturnSimpleXML.php <?php $xmlstr = <<<XML <?xml version='1.0'?> <vendors> <vendor> <name>name</name> <service>code</service> </vendor> </vendors> XML; header("Content-type: text/xml"); echo $xmlstr; ?> -->