Thanks Michael! You're right, E4X is sweet but in this case there are too many things that hang onto it later so I want to create a custom data holder that is more lightweight and fits the needs exactly. Using an object with own API for every hierarchy would also be overkill. Thanks a lot for the efforts though!
I might also try utilizing the Proxy class as there properties later that are not known from the beginning. Cheers, Sascha > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:flashcoders- > [EMAIL PROTECTED] On Behalf Of T. Michael Keesey > Sent: Tuesday, 12 December, 2006 14:00 > To: Flashcoders mailing list > Subject: Re: [Flashcoders] Which Data Structure is good for this? > > 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/ > _______________________________________________ > [email protected] > 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 _______________________________________________ [email protected] 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

