Re: [Flashcoders] sorting xml

2010-08-31 Thread Steven Sacks
> If you think he wants to do "sorting" as you described it, why don't you > post some code that does that instead of arguing about the code sample I > posted trying to help him accomplish what I think he wants to do? Hehe, that shut him up, Jason. :)

Re: [Flashcoders] sorting xml

2010-08-31 Thread kennethkawam...@gmail.com
You can do something like: var xml:XML = ; var a:Array = new Array(); for each(var item:XML in xml.node){ a.push(item); } a.sortOn(["@ccc"]); var newxmllist:XMLList = new XMLList(); for(var i:uint = 0, len:uint = a.length; i < len; i++){ newxmllist += a[i]; } tra

Re: [Flashcoders] sorting xml

2010-08-31 Thread Henrik Andersson
Merrill, Jason skriver: Get an XMLList of all the nodes where the "aaa" attribute has a value of "eee": That's selection, not sorting. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashc

RE: [Flashcoders] sorting xml

2010-08-31 Thread Merrill, Jason
>> He never once made it look like selection. It is clearly a sorting task. >> He wants all the nodes, but in a different order, one defined by the ordering >> of their value fora given attribute. Really? You're so sure? All he said was, "Any easy way to sort xml based on an attribute: so if I

Re: [Flashcoders] sorting xml

2010-08-31 Thread Henrik Andersson
Merrill, Jason skriver: That's selection, not sorting. What is the difference from what he's trying to accomplish? the end result? He never once made it look like selection. It is clearly a sorting task. He wants to sort the xml elements based on their attribute values. He wants all the n

RE: [Flashcoders] sorting xml

2010-08-31 Thread Merrill, Jason
Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson Sent: Tuesday, August 31, 2010 11:39 AM To: Flash Coders List Subject: Re: [Flashcoders] sorting xml Merrill, Jason skriver: > Get an XMLList of all the n

RE: [Flashcoders] sorting xml

2010-08-31 Thread Merrill, Jason
n...@chattyfig.figleaf.com] On Behalf Of Lehr, Theodore Sent: Tuesday, August 31, 2010 10:28 AM To: Flash Coders List Subject: [Flashcoders] sorting xml Any easy way to sort xml based on an attribute: so if I wanted to sort based on aas or ccc __

[Flashcoders] sorting xml

2010-08-31 Thread Lehr, Theodore
Any easy way to sort xml based on an attribute: so if I wanted to sort based on aas or ccc ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders