Sorting Arrays and XML help

I’m trying to bring XML nodes into an array so I can sort them in alphabetical order, then display the data in some textfields in a movieclip.

I’ve managed to get the XML displaying fine in the movieclips and all the data in the arrays, but the problem is I’m not sure where to use name.sort();. Right now you can see I have it at the start of the loop that places all the data in, but it will only sort as it populates and hence becomes pointless.
Is there a way to add all the data into an array, sort it, THEN display all the data in my movieClips?

My XML looks like this:

<message>Zacks msg</message>
<message>Johns msg</message>
<message>Toms msg</message>
<message>Andrews msg</message>

And my AS looks like this:


//set the arrays up
var xmlData:XML = new XML();
var name:Array=new Array();
var donation:Array=new Array();
var message:Array=new Array();
xmlData.ignoreWhite = true;

xmlData.onLoad = function() {
var xPos = 200;//for positioning purposes only
var yPos = 100;//for positioning purposes only
var xmlNode:Array=this.firstChild.childNodes
var len:Number=xmlNode.length-1

for(var i:Number=0;i<=len;i++)

//sort by name

//Display data in MovieClips
currMovie = attachMovie("light", "xml"+i, i, {_x:xPos, _y:yPos});
xPos += currMovie._width;
currMovie.name_txt.text = name*;
currMovie.donation_txt.text = "$" + donation*;
currMovie.message_txt.text = message*;