6

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?

2
  • What kind of queries would you possibly want to issue? Commented Dec 23, 2009 at 15:46
  • find certain div tags or content in a HTML file. Anything really... Commented Dec 23, 2009 at 15:48

2 Answers 2

7

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

Sign up to request clarification or add additional context in comments.

1 Comment

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.
1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.