I want to clear the fact list from a simple site. Each of the facts is enclosed in an <li> . How do I do this with the Html Agility Pack? Is there a better approach?
<li>
The only things enclosed in <li> tags are facts and nothing more.
Sort of:
List<string> facts = new List<string>(); foreach (HtmlNode li in doc.DocumentNode.SelectNodes("//li")) { facts.Add(li.InnerText); }