How Do I Select for Multiple Classes Using Nokogiri and Ruby

Posted by Russ Bradberry on Stack Overflow See other posts from Stack Overflow or by Russ Bradberry
Published on 2010-03-27T16:19:05Z Indexed on 2010/03/27 16:23 UTC
Read the original article Hit count: 304

Filed under:
|
|

From a table element, I would like to select all rows that have the class even or the class odd.

I tried the jQuery syntax:

report.css("table.data tr[class~=odd even]").each{|line| parse_line_item(line)}

but it threw an error, any help is appreciated, thanks.

© Stack Overflow or respective owner

Related posts about ruby

Related posts about nokogiri