MadSeb
MadSeb

Reputation: 8254

Validate some HTML ( non strict ) from C#?

Any thoughts on a library (.NET / C# ) to use to validate a HTML that the user uploads to my website via upload ? It doesn't have to be super strict validation, just something to say if the document uploaded is a decent HTML or not...

Upvotes: 0

Views: 145

Answers (2)

mccow002
mccow002

Reputation: 6914

Check out the HtmlAgilityPack available through nuget

Upvotes: 2

Cheeso
Cheeso

Reputation: 192657

Just run htmltidy using System.Diagnostics.Process.Start(), and count the errors.

Upvotes: 1

Related Questions