1
我得到一个URL,并得到它的所有内容通过调用:CsQuery删除评论
CQ dom = ...;
string content = dom.Text();
我注意到,“文本()”方法也提取HTML注释,如:
<html>
<body>
<!-- This is comment - Ignore me -->
</body>
</html>
我正在寻找一些选项来删除代码中的所有评论。像这样:
dom["comment"].remove();
这可能吗?
谢谢