我有一个HTML <div><h1> hello Hi</div> <div>hi </p></div>
要求输出: <div><h1> hello </h1></div> <div><p>hi </p></div>
使用HTML敏捷包是否可以通过缺少关闭和打开标记来修复此类问题?
HtmlDocument doc = new HtmlDocument();
doc.Load(yourhtml);
doc.Save(Console.Out);
Run Code Online (Sandbox Code Playgroud)
如何将其保存为字符串而不是Console.Out