开发者

HtmlAgility - Save parsing to a string

Just tried using the HtmlAgility Pack for the first time and have a problem.

First I load in from a string variable.

string NewsText = dr["Message"].ToString();
HtmlAgilityPack.HtmlDocument htmlDoc = new HtmlAgilityPack.HtmlDocument();
htmlDoc.LoadHtml(NewsText);
//doing 开发者_运维技巧my stuff...

Then I want to save my changes in the string NewsText. How do I do that? htmlDoc.toString() didnt work.

Thanks!


You're looking for htmlDoc.DocumentNode.OuterHtml.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜