Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Hpricot wont parse <a> elements via XPath

Reply
Thread Tools

Hpricot wont parse <a> elements via XPath

 
 
No Uu
Guest
Posts: n/a
 
      05-25-2009
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/.

 
Reply With Quote
 
 
 
 
Rob Biedenharn
Guest
Posts: n/a
 
      05-25-2009
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
http://www.velocityreviews.com/forums/(E-Mail Removed)



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any equivalent to Ruby's 'hpricot' html/xpath/css selector package? Kenneth McDonald Python 6 12-30-2008 01:38 PM
Hpricot and xpath Li Chen Ruby 7 08-13-2008 12:47 AM
Hpricot syntax different from Xpath ? Celine Ruby 13 12-19-2007 11:25 PM
hpricot and xpath doesn't work like they should ?!? Phlip Ruby 3 07-29-2007 08:06 PM
Hpricot - best way to parse based on comments Jerome --- Ruby 2 11-21-2006 03:20 PM



Advertisments