How about creating an array, parse the data and add it to the array then sort it.