use pixlib ==> http://osflash.org/projects/pixlib

and use the Config, ConfigLoader and ConfigLoaderEvent

it convert an xml file to a object
here is 2 good tutorials about it

http://relivethefuture.com/choronzon/2006/11/14/getting-to-know-pixlib/
http://relivethefuture.com/choronzon/2006/11/15/pixlib-part-2-more-configuration-features-and-a-hidden-gem/

--Pedro Taranto


John laPlante escreveu:
The xml that you've shown consists of all attributes, that is value pairs inside a tag. Each node has a attributes property. Here is a small snippet that demonstrates accessing attributes.

   private function loadProblems(xFileName:String):Void
   {
       var sLessonPath = this.theLessonPath;        // _root.lesson_path;
       var pathedFileName:String = sLessonPath + xFileName
       xmlFile = new XML();
       xmlFile.ignoreWhite = true;
       xmlFile.onLoad = mx.utils.Delegate.create(this, fetchLessonFiles);
       xmlFile.load( pathedFileName );                    return;
} public function fetchLessonFiles():Void
   {           var cFileNum:Number = 1;    // counter
       var cFileID:String;
       cFileID = unescape(xmlFile[cFileNum].attributes.fileName);

   }


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to