From: Ryan Leavengood Date: 2006-05-12T01:10:25+09:00 Subject: Re: extract DIV from HTML You want to use XPath. Check out the XPath section of the following document: http://www.germane-software.com/software/rexml/docs/tutorial.html For your specific case, the XPath query would be something like this: //div[@class='whatever'] Ryan On 5/11/06, Dor Kalev wrote: > Hi, > There is a need to find a specific DIV in a large HTML file (by it's > ID/CLASS) as a routine. > Perhaps XML approach could have helped me, using REXML but what function > goes and searches through the whole XML and finds a specific TAG by it's > attribute? > Someone suggest that myxml will be used for it, but it's installation > didn't, yet, go well. > > >> c:/instantrails/ruby/lib/ruby/site_ruby/myxml/myxml.rb:243:in `initialize': No > >> such file or directory - test.xml (Errno::ENOENT) > >> from c:/instantrails/ruby/lib/ruby/site_ruby/myxml/myxml.rb:243:in `initialize' > >> from example10.rb:6 > > Help will be grately appriciated.