This content has been marked as final. Show 9 replies
Why not organize the XML data into an Array, and then use Array.sort() or Array.sortOn()?
It would be great if there was a way in Flash 8 to sort XML based on a
certain element without duplicating work making an array?
See a simple XML example below:
<?xml version='1.0' encoding='utf-8'?>
If I could sort this by cheapest price, this would give results -
Or by Alphabetical order:
Any suggestions - is this possible with the Flash XML object?
On 15/2/07 16:41, in article email@example.com, "albee"
> Why not organize the XML data into an Array, and then use Array.sort() or
So many things in life would be great if no work was required.
Agreed, Rothrock. Unfortunately Flash's built-in XML handling is somewhat limited, making it necessary to write custom AS functions to handle data the way you need. Hopefully this will be a bit easier in AS3.
That's what I use :)
You're very wise...
Thanks - XPath seems to be what I'm looking for.
Makes more sense that converting the XML into Arrays I think.
There seems an Xpath API built into Flash8...
Is this the same thing as the xfactorstudios class?
On 16/2/07 21:14, in article firstname.lastname@example.org, "LuigiL"
> Sounds like you might like XPath - http://xfactorstudio.com
No, not nearly. XPath by xfactorstudio has far more functionality. It's just one of those third party utility packages that - frankly - needs to be in your common library when you work a lot with xml - in my opinion I must add.