Sort numbers and return the lowest

Hey there
i am trying to all the numbers within a xml group. to find the lowest lunber out of the lot.

I am think of using something like

or is there some kind of method for returning the lowest numerical value like sort.toLowest();

this is in flex so there might be a method to do something like this. anyone.

if not I am thinking of creating a function to pass the values to.
and compare each value to the lowest.
if lower then that becomes the new lowest.


XmlLength =
for(i=0;i<XmlLength; i++){
finalLeast = lowest;


finalLeast = Newval;

return finalLeast;

the only bad news is i need to pass 3 xml data feeds to it.

and I need to return and different value per pass. I need to pass to the loop about 9 times.

ill have a think on it, but any epiphones would be well appriciated…