From: Park Heesob Date: 2006-11-28T01:32:47+09:00 Subject: Re: How to get data from html table Hi, >From: Vikash Kumar >Reply-To: ruby-talk@ruby-lang.org >To: ruby-talk@ruby-lang.org (ruby-talk ML) >Subject: How to get data from html table >Date: Mon, 27 Nov 2006 20:20:54 +0900 > >I want to store the values of a table in different variables, I have the >following table structure: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
 Case5-0410/11/2006 23:24:33Case5-041005Sell1,000ARP$36.90
 Case5-0310/11/2006 23:20:07Case5-031005Buy1,500ARP$36.70
 Case4-0410/11/2006 05:28:54Case4-041004Sell300RIL$490.00
 Case4-0310/11/2006 05:21:32Case4-031004Buy200RIL$489.90
> >I want to store the values in variables so that I can compare records. >Please help me out how to do this in ruby. > Here is another way: After saving the html table text to file 'w.xml', You can deal the value like this: require 'rexml/document' include REXML doc = Document.new File.new("w.xml") doc.elements.each("*/tr/td") {|e| puts e.texts } Regards, Park Heesob _________________________________________________________________ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/