Use count(), like:

  document.xpath("//*[count(td)=2]")

You can also select children at certain offsets with td:nth-child(N)
or position(N)

HTH,
Ammar


On Sat, Aug 28, 2010 at 10:17 AM, Pen Ttt <myocean135 / yahoo.cn> wrote:
> for example,
> table1:
> <table >
> <tr>
> <td>kk</td>
> </tr>
> <tr>
> <td > 1 </td>
> <td > 2 </td>
> </tr>
> <tr>
> <td > 3 </td>
> <td > 4 </td>
> </tr>
> <tr>
> <td>qq</td>
> </tr>
> </table>
>
> table2:
> <table >
> <tr>
> <td>kk</td>
> </tr>
> <tr>
> <td > 1 </td>
> <td > 2 </td>
> </tr>
> <tr>
> <td > 3 </td>
> <td > 4 </td>
> </tr>
> </table>
>
> i want to get table2 from table1,to get row which contains more then
> one column,how to do it with nokogiri??
>
> --
> Posted via http://www.ruby-forum.com/.
>
>