I want to get the contents of an ordered list from a HTML page using HTMLAgilityPack in C#, i have tried the following code but, this is not working can anyone help, i want
The following code worked for me
public static string GetComments(string html) { HtmlDocument doc = new HtmlDocument(); doc.LoadHtml(html); string s = ""; foreach (HtmlNode node in doc.DocumentNode.SelectNodes("//ol")) { s += node.OuterHtml; } return s; }