tags:

views:

121

answers:

2

Does anyone know if there's a library that will allow you to Query the HTML DOM with LINQ?

Something like LINQtoHTML.

Would it be useful to create such a thing if it does not exist yet?

+1  A: 

There is not currently, however, if it's xhtml, you could load it up and use Linq-to-XML :)

Joel Martinez
+6  A: 

The HtmlAgilityPack will let you do this. It's pretty forgiving with malformed HTML, too.

Tim S. Van Haren
If you get the new beta of HtmlAgilityPack it contains members very similar in style to LINQ-to-XML. If you are already familiar with LINQ-to-XML this is the way to go.
Stephan