I'm using Html Agility Pack to fetch a webpage. I want to collect all the TEXT I AM LOOKING FOR of the following form:
<li><a href="/deal/map/4087664" class="show-location" title="bla bla" data-address="TEXT I AM LOOKING FOR"></a></li>
I tried this code:
var web = new HtmlWeb();
var doc = web.Load(url);
var nodes1 = doc.DocumentNode.SelectNodes("//[@data-address]");
var nodes2 = doc.DocumentNode.SelectNodes("//[@data-address={0}]");
both threw an exception: Expression must evaluate to a node-set. How can i correct my selector ?