Parsing HTML tags to find a specific Table Row
Posted
by
moutonc
on Stack Overflow
See other posts from Stack Overflow
or by moutonc
Published on 2012-06-06T16:32:42Z
Indexed on
2012/06/06
16:40 UTC
Read the original article
Hit count: 165
c#
|html-agility-pack
Hello everyone I was set up with a Challenge where I must parse through an HTML page to find the end date of all the classes. I am using the HTMLAgilityPack but, this is the first time I have used it, also the webpage who ever set it up has no classes or Id's and the end dates are stored in a Tr H4 tag. I am not sure how to Parse through any hits?
My Code:
HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
doc.Load(txtURL.Text);
sw.WriteLine("GET /academics/academic-calendar/ HTTP/1.1");
sw.WriteLine();
String response = sr.ReadToEnd();
txtHTML.Text = response;
© Stack Overflow or respective owner