How do I validate a html file with C#?

后端 未结 3 2011
星月不相逢
星月不相逢 2020-12-11 05:24

I have a C# application that receives an html file. I want to parse and validate it. On output it will return a list of errors or that my html is valid.

Has anyone

3条回答
  •  孤城傲影
    2020-12-11 05:42

    There is an obscure DLL in the framework version 1.0 (!) Microsoft.mshtml.dll and that is the only way in the framework to deal with DOM. If HTML is XHTML and a valid XML, then you can use XML but otherwise this is the only chance.

提交回复
热议问题