HtmlAgilityPack 是否能够从 HtmlDocument 对象返回整个 HTML 标记作为字符串?
最佳答案
当然,你可以这样做:
HtmlDocument doc = new HtmlDocument();
// call one of the doc.LoadXXX() functions
Console.WriteLine(doc.DocumentNode.OuterHtml);
OuterHtml 包含整个 html。
关于c# - HTML敏捷包: Get whole HTML document as string,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5183385/