On 12/11/06, Sascha <[EMAIL PROTECTED]> wrote:
I would be interested in recommendations about what kind of data structure is best used in the following situation. I'm loading in a XML file with a typical recursive structure, then the data from it should be parsed into a data storage object and this data should be accessible globally through the application. The XML file has a structure like this:
[snipped]
The e4x functions make dealing with XML objects soooo nice that I don't see any particular reason to convert it to something else. But, if you insist, how about a data model package with classes like so: Model public function get xml():XML; public function set xml(value:XML):void ResourceList extends Model public function getDisplay(type:uint):Display; public function get data():Data; override public function set xml(value:XML):void Display extends Model public function get propertyCount():uint; public function get backgroundCount():uint; public function get objectCount():uint; public function getProperty(index:uint):Property; public function getBackground(index:uint):Background; public function getObject(index:uint):DisplayObject; override public function set xml(value:XML):void ... so on and so forth.... -- T. Michael Keesey The Dinosauricon: http://dino.lm.com Parry & Carney: http://parryandcarney.com ISPN Forum: http://www.phylonames.org/forum/ _______________________________________________ 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