I have a webmethod like,
public List<List<string>> HelloWorld() {
WebClient webClient = new WebClient();
string page = webClient.DownloadString("http://www.deu.edu.tr/DEUWeb/Guncel/v2_index_cron.html");
HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
doc.LoadHtml(page);
List<List<string>> table = doc.DocumentNode.SelectSingleNode("//table")
.Descendants("tr")
.Skip(1)
.Select(tr => tr.Elements("td").Select(td => td.InnerText.Trim()).ToList())
.ToList();
return table;
}
I've got the information inside the table but I want to get also <a href="Link">
link information of the table.
What should I add to the method? I need both information at the same time.
HTML
<table>
<tr>
<td>
<img/>
</td>
<td>
<a href="what I want">Text</a>
</td>
</tr>
.....
</table>