Friday, February 15, 2013

How to extract Javascript from html source by HtmlAgilityPack

            HtmlAgilityPack.HtmlDocument htmlDoc = new HtmlAgilityPack.HtmlDocument();
            htmlDoc.LoadHtml(html);
            var scriptList = htmlDoc.DocumentNode.Descendants()
                .Where(n => n.Name == "script" );