using System; using System.Collections.Generic; using System.Linq; using System.Xml; using System.Xml.Linq; using System.IO; namespace SimpleStreaming { class Program { static void Main(string[] args) { XElement abstracts = XElement.Load(@"abstract.xml"); IEnumerable bardQuotes = from el in abstracts.Elements() where el.Element("abstract").Value .Contains("Shakespeare") select (string)el.Element("url"); foreach (string str in bardQuotes) { Console.WriteLine(str); } } } }