Hpricot wont parse <a> elements via XPath

Discussion in 'Ruby' started by No Uu, May 25, 2009.

  1. No Uu

    No Uu Guest

    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.
    --
    Posted via http://www.ruby-forum.com/.
     
    No Uu, May 25, 2009
    #1
    1. Advertising

  2. 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 Biedenharn, May 25, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kenneth McDonald
    Replies:
    6
    Views:
    1,816
    Mark Thomas
    Dec 30, 2008
  2. Jerome ---
    Replies:
    2
    Views:
    195
    Ken Bloom
    Nov 21, 2006
  3. Phlip
    Replies:
    3
    Views:
    260
    anansi
    Jul 29, 2007
  4. Celine
    Replies:
    13
    Views:
    284
    Chris Shea
    Dec 19, 2007
  5. Li Chen

    Hpricot and xpath

    Li Chen, Aug 12, 2008, in forum: Ruby
    Replies:
    7
    Views:
    170
    Phlip
    Aug 13, 2008
Loading...

Share This Page