You have two choices. You can embed the xml from an external file using <mx:XML source="myFolder/Myfile.xml" />, which is a compile-time process, or you can load it at run-time using httprequest as Matt says.
Tracy Spratt, Lariat Services, development services available _____ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Wesley Acheson Sent: Wednesday, August 12, 2009 7:21 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: How to use XML file as dataProvider for <s:List> If you want to load it from the server its easiest to make a http request. If you don't need to change it at runtime. You can embed an xml easy enough. anyway to load one see http://livedocs. <http://livedocs.adobe.com/flex/3/html/help.html?content=13_Working_with_XML _11.html> adobe.com/flex/3/html/help.html?content=13_Working_with_XML_11.html regards wes On Wed, Aug 12, 2009 at 10:53 PM, mattcalthrop <mcalth...@gmail. <mailto:mcalth...@gmail.com> com> wrote: That's almost it - but I want the XML to reside in an external file, not in a string in the AS3. Is that easy? Matt PS - this may be a duplicate post... I replied already, but haven't seen it appear on the Y!group yet. --- In flexcod...@yahoogro <mailto:flexcoders@yahoogroups.com> ups.com, Gautam P <p.gau...@...> wrote: > > var imageXML:XML = new XML('<imageList><image location="path/to/image1.jpg"/>'+ > > '<image location="path/to/image2.jpg"/></imageList>'); > var s:List = new List(); > s.dataProvider = imageXML.image; // this give a XMLList (e4x expression) > s.labelfield = "@location"; // to display location in the list. to > access attribute prefix "@" symbol > > Regards, > Gautam. > ------------------------------------ -- Flexcoders Mailing List FAQ: http://groups. <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt> yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share. <https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e6 2079f6847> acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail- <http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo> archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links (Yahoo! ID required) mailto:flexcoders-fullfeat <mailto:flexcoders-fullfeatu...@yahoogroups.com> u...@yahoogroups.com