0

Possible Duplicate:
What is the best way to parse html in C#?

I'm trying to write some code which uses a HttpWebRequest with GET method (or any suggested faster function), find a keyword on the page and then display what comes after it in various textviews.

The homepage it looks up will always be the same and will always find the same lines but with different data.

I've read about something called HtmlAgilityPack a lot but I cannot figure out if I can use it for this, nor how to.

Is there any faster functions to use to just get and find data within source?
Can I use HtmlAgilityPack, if so how (example please)?
Is there any easier way this can be done?

cheers
nox

Community
  • 1
  • 1
noxious
  • 57
  • 2
  • 11
  • Probably **the most** asked question on SO about C#. [What is the best way to parse HTML in C#?](http://stackoverflow.com/questions/56107/what-is-the-best-way-to-parse-html-in-c) – Jonathon Reinhart Jul 23 '12 at 21:13

1 Answers1

0

Yes you can use HtmlAgilityPack, if you want to extract text from tags

HtmlAgilityPack is an HTML parser that builds a read/write DOM from “real world” HTML files. It supports XPATH or XSLT and is tolerant with "real world" malformed HTML

In one line it use's XPath queries that real helps in extracting data quickly

HatSoft
  • 11,077
  • 3
  • 28
  • 43