Forum: Ruby Hpricot wont parse <a> elements via XPath

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2a013cfdc47906efef205a5fb8f0f777?d=identicon&s=25 Archer 007 (archer007)
on 2009-05-25 23:39
In this code (http://pastebin.com/m36de2949) unread_links will not read
the <a> elements specified in line 12. I double-checked the XPath with
the XPather Firefox extension, and it is correct.

Is this some obscure difficulty with Hpricot? I seem to be doing
everything correctly.
Ef3aa7f7e577ea8cd620462724ddf73b?d=identicon&s=25 Rob Biedenharn (Guest)
on 2009-05-26 00:23
(Received via mailing list)
On May 25, 2009, at 5:39 PM, No Uu wrote:

> In this code (http://pastebin.com/m36de2949) unread_links will not
> read
> the <a> elements specified in line 12. I double-checked the XPath with
> the XPather Firefox extension, and it is correct.
>
> Is this some obscure difficulty with Hpricot? I seem to be doing
> everything correctly.
> --


It looks like those <a> tags are first children of the <td
class="row1"> so there is no preceding-sibling for them.

Perhaps you need to post what you expect to read in addition to the
xpath that you're trying to use to find it.

-Rob

Rob Biedenharn    http://agileconsultingllc.com
Rob@AgileConsultingLLC.com
This topic is locked and can not be replied to.