djliquidice
08-16-2006, 12:29 AM
Hi fellas,
I'm trying to get a datagrid.dataProvider to be the result of a URL. The alert.show function shows me the data, but it's just a string. Is there a way to convert the data from XML to an array so that the datagrid can read? Thanks in advanced. This place pwns.
public function getData():void {
var evtLoader:URLLoader = new URLLoader();
var evtRequest:URLRequest = new URLRequest("php.functions/open_events_xml.php.xml");
evtLoader.load(evtRequest);
evtLoader.addEventListener("complete", onComplete);
}
public function onComplete(event:Event):void {
var evtLoader:URLLoader = URLLoader(event.target);
evtXML = new XML(evtLoader.data);
Alert.show(evtXML.toString());
evtViewer.dataProvider=evtXML;
}
I'm trying to get a datagrid.dataProvider to be the result of a URL. The alert.show function shows me the data, but it's just a string. Is there a way to convert the data from XML to an array so that the datagrid can read? Thanks in advanced. This place pwns.
public function getData():void {
var evtLoader:URLLoader = new URLLoader();
var evtRequest:URLRequest = new URLRequest("php.functions/open_events_xml.php.xml");
evtLoader.load(evtRequest);
evtLoader.addEventListener("complete", onComplete);
}
public function onComplete(event:Event):void {
var evtLoader:URLLoader = URLLoader(event.target);
evtXML = new XML(evtLoader.data);
Alert.show(evtXML.toString());
evtViewer.dataProvider=evtXML;
}