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.
Archer 0. (Guest)
on 2009-05-26 01: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.
Rob B. (Guest)
on 2009-05-26 02: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 B.    http://agileconsultingllc.com
removed_email_address@domain.invalid
This topic is locked and can not be replied to.