If your question is to read the contents of XML file then you can make use of the UrlLoader class as shown below:
private var loader:URLLoader = new URLLoader();
[Bindable]public var dpac:ArrayCollection = new ArrayCollection();
private function loadData():void
var request:URLRequest = new URLRequest();
request.url = "data.xml";
private function dataLoadComp(event:Event):void
var xml:XML = new XML(loader.data);
var xmlDoc:XMLDocument = new XMLDocument(xml);
var decoder:SimpleXMLDecoder = new SimpleXMLDecoder(true);
var obj:Object = decoder.decodeXML(xmlDoc);
dpac = obj.rows.row as ArrayCollection;
If this post answers your question or helps, please kindly mark it as such.
I have implemented localization(mulilingual) in my application. Now to change the language settings datas which changes on changing language option resides inside .properties file.
i want instead of readin that from .properties file it shud read from .xml file.
is that possible ?
No.. U can't use XML for localization.. U must use .properties file only..
Strictly speaking, that's not really true. At runtime, the ResourceManager deals with IResourceBundles for localization, not properties files or XML files. As long as you implement IResourceBundle, you can back it with XML, properties files, JSON, AMF--anything you like. The problem is that mxmlc will not build resource modules for you out of anything except properties files, and you can't just compile resource bundles into a .swf using anything other than properties files. If you build your own interface to spit out IResourceBundles, this could work, but it's probably more trouble than it's worth.
The better solution (assuming you're linking these into the application) is to write a script to pre-process the XML into properties files.
THANX A LOT FOR THE REPLY AND EXPLANATION