From: Ross Bamford Date: 2006-02-21T19:37:48+09:00 Subject: Re: How can I search value from xml On Tue, 2006-02-21 at 16:17 +0900, Artit Satanakulpanich wrote: > I want to use rexml or any library ,please > thankz As others say, for now REXML is probably the way to go, but *very* soon now you'll be able to use Libxml2 also if things keep going to plan over here. require 'xml/libxml' d = XML::Parser.file('test.xml').parse p d.find('//biblioentry[pubdate = 1977]').to_a If you want to try it before we get to release go to CVS: http://rubyforge.org/scm/?group_id=494 (Also, REXML does support XPath, so you should be able to modify the above to work with that. Just to be sure, I tried it 100 times over: ### XPath ### user system total real rexml 9.840000 0.080000 9.920000 ( 10.046963) libxml2 0.090000 0.000000 0.090000 ( 0.139592) ;) -- Ross Bamford - rosco@roscopeco.REMOVE.co.uk