how to extract nested href

Topics: User Forum
Jan 13, 2014 at 10:40 AM
Edited Jan 13, 2014 at 10:40 AM
Hi

I am willing to extract email id form following html I tried lot but no luck, can any one pls help
<div class="email">
<script type="text/javascript">eval(unescape('%64'))</script><a target="_blank" href="/business/do_link/38494178?url=mailto:ebridalwed25@yahoo.com" rel="nofollow" class="searchlink email" title="EBridal">ebridalwed25@yahoo.com</a><br></div>
I am willing to expect email id form this link
  For Each link As HtmlNode In doc.DocumentNode.SelectNodes("//div[@class='email']")

            ans = link.Attributes("href").Value
Jan 13, 2014 at 2:39 PM
Edited Jan 13, 2014 at 2:42 PM
This code will work:
doc.DocumentNode.SelectSingleNode("//div[@class='email']/a")
Take a look: http://www.w3schools.com/xpath/xpath_syntax.asp