I'm loading in an xml file.  The xml file defines the layout of the movie (think mxml at runtime, but not really for reasons that aren't relevant here).  The layout is fairly complex and from the coder's perspective it would be a great help to be able to traverse the original xml document instead of having to search through layout objects.  So when an instance of a DisplayObjects is created, I would like to point the xml node that created the DisplayObject to the instance of the DisplayObject.

What I think I'm going to do is have an Dictionary in a static class and just register the xml with the object instance and do a lookup when I need to.  I'd rather have the reference within the XML because it just seems nicer to me, but your ideas will work just fine.

Thanks,

Dan

On 9/27/06, Dustin Mercer <[EMAIL PROTECTED]> wrote:

I agree, a hashtable or a Dictionary would be better suited for this depending on your need… I don't know how your performance on the XML would scale compared to those associative classes.  Are you trying to persist the XML back to the file system?  As Erik said, maybe understanding the need for XML can help us help you.  If not, maybe try the dictionary class: http://livedocs.macromedia.com/flex/2/langref/flash/utils/Dictionary.html

 

Dustin Mercer

 


From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com] On Behalf Of Tracy Spratt
Sent: Wednesday, September 27, 2006 4:10 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Object references within XML

 

Eww, as I recall, the IE browser DOM permitted stuff like that, but I do not know if the e4x XML class will.

 

If it was me, I'd use an associative array (hashtable).

 

Tracy

 


From: [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com] On Behalf Of EECOLOR
Sent: Wednesday, September 27, 2006 5:31 PM
To: [EMAIL PROTECTED]ups.com
Subject: Re: [flexcoders] Object references within XML

 

Hello,

 

may i ask why you want to keep references to objects in an xml? I cant think of any use. It may help awnsering your question maybe.

 

 

Greetz Erik


__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to