i need to sort a large XML file and i’ve been reading that placing each of the elements into an array is the way to sort the data using Array’s sortOn() method.
i’m concerned about speed. perhaps storing them into a Vector.< XML > instead of an Array will offer a slight increase in speed, or not, but is this approach the best way to sort XML data?
Actually, I see two solutions :
1/ You load a static xml file and therefore you can do sorting manually.
2/ You load a dynamic xml and to gain speed, server side can provide sorting (easily in PHP).
i think this is the better thing to do.
So in the two case, you have to parse your xml once, store data (Vector, Value Object) and clear the memory by destroying the reference to your xml.
If you want to sort on Flash side, you have to create your own function and using the method sortOn seems inevitable.