This project has moved and is read-only. For the latest updates, please go here.

HTML Agility Pack: HREF

Topics: User Forum
Jul 3, 2014 at 11:11 PM
Hi, I've following html code:

<td headers="header1"><b><a href="">TITLE headers="header2"></td><td headers="header3" class="centrato">23/04/2014</td></tr>

I need to store in a datatable:
  • HREF VALUE in "Link" column;
  • TITLE in "Title" column;
  • 23/04/2014 in "Date" column;
I tried this:
int i = 0;
foreach (HtmlNode node in tmlDoc.DocumentNode.SelectNodes("//td[@headers='header1']"))
                table.Rows[i]["Post"] = node.InnerText;
This code allow me to add all Title in the datatable but I'm not able to add DATE and HREF, can you help me please?
Jul 10, 2014 at 6:48 PM
Any help please?