And did you just try "a" as the sort field? I would expect that to work. If you were sorting on an attribute named "a", the sort field would be @a. I am pretty sure the sortField cannot handle expressions.
Tracy Spratt, Lariat Services, development services available _____ From: [email protected] [mailto:[email protected]] On Behalf Of Tracy Spratt Sent: Saturday, September 26, 2009 10:38 AM To: [email protected] Subject: RE: [flexcoders] Sorting XML <HELP PLEASE> Use a custom sortFunction. In that you will have references to the xml nodes and you can use normal e4x expressions to traverse the child nodes, then perform the sort logic. Tracy Spratt, Lariat Services, development services available _____ From: [email protected] [mailto:[email protected]] On Behalf Of laurabakerstanley Sent: Saturday, September 26, 2009 3:19 AM To: [email protected] Subject: [flexcoders] Sorting XML <HELP PLEASE> Hi - I have structure that looks like this: <x> <y> <a> hello </a> <b> world </b> </y> <y> <a> apple </a> <b> pear </b> </y> </x> I want to sort the 'records' i.e. those with a root of 'y' by one of the tags in the their children. I want to be able to create a sort field of y.a, but I cannot. Does anybody know if I am banging my head against a brick wall here? Is there away to seach against tage (I've seen lots of examples attributes) and can I use 'complex field names' (with or without attributes)? This stuff is all dynamic - I don't know what the structures might be, so I'm really unkeen on using strong typing at all .... I am doing this first thing on a saturday, as my deadline was yesterday, but I might just be able to save my bacon if I can deliver for monday! Thanks you for takig the time to read. Laura

