Agility Pack Usage for Getting Content Between html tags

Topics: Developer Forum
Dec 1, 2012 at 7:58 PM
public string getContent(string webAddress)
        HtmlAgilityPack.HtmlWeb web = new HtmlAgilityPack.HtmlWeb();
        HtmlDocument doc = web.Load(webAddress);
        return string.Join(" ", doc.DocumentNode.Descendants().Select(x => x.InnerText));

am using this function to extract content between html tags however  visual studio is showing exception on the line of return! Problem might be in decendant() function! says not found in context! help plz!