I would put the data into a suitable collection and sort it in whatever order you need. You have used a collection already, but perhaps you didn't choose the right collection (I don't see where you declare it). And you certainly didn't sort it.
Joined: Mar 22, 2008
Dear Paul Clapham,
Thanks a lot. This has fixed my problem
subject: How to print xml element in asc or desc order