How do I get the maximum length for each column using Nokogiri?
Example HTML:
<table>
<tr>
<td>ONE</td><td>TWO</td><td>THREE</td>
</tr>
<tr>
<td>Monaco</td><td>Bangkok</td><td>Thailand</td>
</tr>
</table>
The result would the string length inside each <td>.
<td>one</td> => 3
<td>two</td> => 3
<td>three</td> => 5
....
First you would map the length of tr/td:
transpose that to get columns and get just the max from each: