How can I check if a string (webpage) markup is correct in .Net?

I wrote a VB.Net page to view my site. It stores the HttpWebResponse in a string. How can I check if the page markup is correct in .Net? - something like W3 is validated with direct input. I'm looking for something that can identify the DOCTYPE, confirm it yes or no, and return a list of failures that I can display.

+1


a source to share


2 answers


Here's some information on how to do it: Validate XHTML in C # (you should translate this to VB.NET if needed).



There is also available

+3


a source


The W3C has an experimental API that can accept snippets of code that might be useful, and there are other third party web services (although I'm not sure if they can accept snippets).



I am afraid that I have ever used them, so I cannot comment on their effectiveness ...

+1


a source







All Articles