From: Pen Ttt Date: 2010-08-29T11:20:50+09:00 Subject: Re: select tr>3 with nokogiri think Ammar ,one problem vanish,another occur. here is the content of /home/pt/mytest:
reportdate 10/31/09 10/31/08 10/31/07 10/31/06 10/31/05
Cash & Equivalents 2,493 1,429 1,826 2,262 2,251
Receivables 595 770 735 692 753
Notes Receivable 0 0 0 0 0
Inventories 552 646 643 627 722
what i want to get is : p1: require 'rubygems' require 'nokogiri' doc = Nokogiri::HTML.parse(open('/home/pt/mytest')) result=doc.xpath('//table/tr[td[@class="ticker"]]') puts result i can get what i want with p1 p2: require 'rubygems' require 'nokogiri' doc = Nokogiri::HTML.parse(open('/home/pt/mytest')) result=doc.xpath('//table/tr[td[not(@class="tickerSm")]]') puts result why can't i get what i want with p2?? how to fix p2? think for your help. -- Posted via http://www.ruby-forum.com/.
Receivables 595 770 735 692 753
Notes Receivable 0 0 0 0 0
Inventories 552 646 643 627 722