Hi, If you are using the latest version of the .Net framework then this task can be performed easily using LINQ. Below is an example of what you are trying to do in C#: XDocument servers = XDocument.Load(@"C:\server.xml"); var q = from c in servers.Descendants("server") orderby (string)c.Element("con_id") ascending group c by (string)c.Element("con_id"); foreach (var con_id in q) Console.WriteLine(con_id); Sorry, I don't have a version of this in VB.Net!
Clean code is the key to happiness.