From: Ken Bloom Date: 2010-08-29T11:08:14+09:00 Subject: Re: select tr>3 with nokogiri On Fri, 27 Aug 2010 23:26:53 +0900, Pen Ttt wrote: > i want to get row which it contains more than 3 columns how to write > xpath with nokogiri > > > require 'rubygems' > require 'nokogiri' > item='sometext' > doc = Nokogiri::HTML.parse(open(item)) > data=doc.xpath('/html/body/table/tr[@td.size>3]') puts data > it can not run , help and advices appreciated. doc.xpath('/html/body/table/tr[count(td)>3]') -- Chanoch (Ken) Bloom. PhD candidate. Linguistic Cognition Laboratory. Department of Computer Science. Illinois Institute of Technology. http://www.iit.edu/~kbloom1/