[英]HtmlAgility - Save parsing to a string
刚尝试首次使用HtmlAgility Pack并遇到问题。
首先我从字符串变量加载。
string NewsText = dr["Message"].ToString();
HtmlAgilityPack.HtmlDocument htmlDoc = new HtmlAgilityPack.HtmlDocument();
htmlDoc.LoadHtml(NewsText);
//doing my stuff...
然后我想将我的更改保存在字符串NewsText中。 我怎么做? htmlDoc.toString()没有用。
谢谢!
您正在寻找htmlDoc.DocumentNode.OuterHtml
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.