// 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.IO; using System.Linq; using System.Net; using System.Xml.Linq; namespace E { public class Program { public static void Main(string[] args) { using (WebClient wc = new WebClient()) { WebClient webClient = new WebClient(); webClient.UseDefaultCredentials = true; string downloadString = webClient.DownloadString("http://dreamreef.dk/Status.rss"); XNamespace ns = "http://www.w3.org/2005/Atom"; XDocument doc = XDocument.Parse(downloadString); foreach (var item in doc.Element(ns + "feed").Elements(ns + "entry")) { string title = item.Element(ns + "title").Value; string summary = item.Element(ns + "summary").Value; string description = item.Element(ns + "content").Value; Console.WriteLine("{0}: \t\t\t {1} \t\t\t {2}", title, summary, description); } } } } }