// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Collections.Generic; using System.Linq; using System.Xml.Linq; namespace E { public class UpdateFile { public string Name { get; set; } public string Hash { get; set; } } public class Program { public static void Main(string[] args) { XDocument doc = XDocument.Load("http://www.gamersjudgement.com/OCTGN/Hash.XML"); List hashes = doc.Root.Elements("Files").Select(f => new UpdateFile{ Name=f.Element("Name").Value, Hash=f.Element("Hash").Value }).ToList(); foreach(UpdateFile uf in hashes) { Console.WriteLine(uf.Name + " : " + uf.Hash); } } } }