RE: [Flashcoders] Multidimensional Object/Array Question

2007-01-02 Thread Merrill, Jason
Yeah, i don't touch AS2's xml api any more than I have to. I know there are other systems out there, but I find XPath does the job for me about 100% of the time. Here's a little tute I threw together for XPath: A little clarification I think is needed on that: 1) That's technically

[Flashcoders] Multidimensional Object/Array Question

2006-12-28 Thread Mike Dunlop
Hi gang, I'm having difficulty parsing an xml file into a multidimensional array and was wondering if anyone could see why the following isn't working... My guess is that an object variable can't be an array? XML Sample

Re: [Flashcoders] Multidimensional Object/Array Question

2006-12-28 Thread slangeberg
item.mediums = new Array(); Should be fine, however: item.mediums[item.mediums.length]['id'] = m[i_m].attributes.id; Looks like you're trying to access a 2D array or Object in array, so you would have to do something like: var medium:Object = new Object(); medium.id =

Re: [Flashcoders] Multidimensional Object/Array Question

2006-12-28 Thread Mike Dunlop
Thanks for the input Scott! I simply trying to find the easiest way to dump a 2D xml structure into an array/object that can be easily iterated through in a loop. Do you think there is a better way than what i am trying to do? I'm an experienced php/sql developer but still learning the

Re: [Flashcoders] Multidimensional Object/Array Question

2006-12-28 Thread Ron Wheeler
Why would you not put this into an object and make your life simple? The list object has a single property - an array of cats. (list probably should be called cats but that is just a naming thing.) Each cat object seems to have a name property and a note property and an array of medium objects.

Re: [Flashcoders] Multidimensional Object/Array Question

2006-12-28 Thread slangeberg
Yeah, i don't touch AS2's xml api any more than I have to. I know there are other systems out there, but I find XPath does the job for me about 100% of the time. Here's a little tute I threw together for XPath: http://criticalpile.com/blog/?p=4 -Scott On 12/28/06, Mike Dunlop [EMAIL PROTECTED]

Re: [Flashcoders] Multidimensional Object/Array Question

2006-12-28 Thread Mike Dunlop
Awesome Ron -- Thanks much!! Best, Mike D . Mike Dunlop // Droplab [ e ] [EMAIL PROTECTED] On Dec 28, 2006, at 2:04 PM, Ron Wheeler wrote: Why would you not put this into an object and make your life simple? The list object has a single property