[Wtr-general] Count number of tables in HTML page

Bret Pettichord bret at pettichord.com
Wed Sep 6 14:23:30 EDT 2006


aidy rutter wrote:
> I have a number of tables with an ID="SearchResults".
>  
> Is it possible to count the number of tables with this ID?
  ie.tables.select{|t| t.id == 'SearchResults'}.length

Our collections include the Ruby "Enumerable" module. That's what allows 
you to do this and lots of other cool things.

Bret


More information about the Wtr-general mailing list