I understand there are many XPath href questions, but none suit my case or I am a beginner of it and don't know what's wrong with my code. Kindly bear with me if this is silly question.
I have this HTML structure:
<td valign="top">08-Jan-14 16:02</td>
<td valign="top"><span style="cursor:help;" title="Regulatory News Service">RNS</span></td>
<td valign="top"><a href="share-regulatory-news.asp?shareprice=BARC&ArticleCode=d6rr2uxo&ArticleHeadline=Blocklisting_Interim_Review" class="linkStoryHeadline rnsArticle" title="Blocklisting Interim Review">Blocklisting Interim Review</a></td>
<td valign="top">Company Announcement - General</td>
My code is:
HtmlNodeCollection cols5 = rows[i].SelectNodes(".//td[3]/a[@href]");
Stream writer to write the URL:
sw.WriteLine(cols5[j].InnerText);
The result appears to be Blocklisting Interim Review
instead of the URL. Can anyone kindly look into it? I've went through XPath guide and search all over but still can't get the exact answer for my case. Any help would be much appreciated!