html agility pack: how to extract raw text
Quick question, how do I get all raw text (i.e., removing all html t开发者_如何转开发ags) using html agility pack?
HtmlDocument doc = new HtmlDocument();
doc.Load(html);
If you download source code from Html Agility Pack page (look for "Html Agility Pack 1.4.0 Source" file) there is folder Html2Txt that contains the code you need (look for the HtmlToText class in HtmlConvert.cs file).
精彩评论