I tried HtmlAgilityPack and the following code, but it does not grab text from html lists:
HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument(); doc.LoadHtml(htmlStr); HtmlNode node = doc.DocumentNode; return node.InnerText;
Here is the code that fails:
<as html> <p>This line is picked up <b>correctly</b>. List items hasn't...</p> <p><ul> <li>List Item 1</li> <li>List Item 2</li> <li>List Item 3</li> <li>List Item 4</li> </ul></p> </as html>
source share