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

Chris McMahon christopher.mcmahon at gmail.com
Wed Sep 6 12:04:36 EDT 2006


On 9/6/06, aidy rutter <aidy.rutter at gmail.com> wrote:
>
> Hi,
>
> I have a number of tables with an ID="SearchResults".
>
> Is it possible to count the number of tables with this ID?
>


Here's a goofy way to do it.  Someone else might have a better suggestion:

raw_data = ie.html
silly_array = rawdata.split(/ID=SearchResults/)
number_of_tables = silly_array.length - 1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060906/eab9a741/attachment.html 


More information about the Wtr-general mailing list