I have an XML here as follows,
<?xml version="1.0" encoding="ISO-8859-1"?> <countries> <country> <text>Norway</text> </country> <country> <text>Sweden</text> </country> <country> <text>France</text> </country> <country> <text>Italy</text> </country> </countries>
And, I am trying to sort it without using XSLT, and I am not using this to edit the XML file. I only would like to display it.
Here is what I come up with:
countryList = document.SelectNodes("/countries/country") Dim country As XmlNode Dim count_record As Integer = country.Count-1 For i As Integer = 0 to count_record country = countryList.Item(i) Dim country_name As XmlNode = country.FirstChild countryNodesOut.Text &= "<b>Name:</b> " & country_name.InnerText & "<br/>" Next
Based on this, what do I need to do so that it would be "sorted"?
Thanks for your help.