From: Tobias Reif Date: 2002-03-18T02:54:25+09:00 Subject: Re: XPath Michael Schuerig wrote: > Still another question: Is it necessary (with the current REXML) to > iterate over the OLD_TREE explicitly in Ruby? AFAICS: currently, yes. But XPath support in REXML will grow to be more complete. (also see my other post) > My original idea was to > build an XPath expression that does this implicitly. Sure; that's why I said my program is quirky, and why I said that this is partly due to REXML's XPath support still evolving. > XPath.first(OLD_TREE,"//entry[title=\"#{title}\" and year=\"#{year}\"]") Yep. In XSLT the apos in the title string has to be quirkily replaced to look like this: /biblio/entry[ title=concat('Programming Ruby. The Pragmatic Programmer',"'",'s Guide') and year='2000' ]/author . But AFAICS this should not be needed in REXML. > When I played around with this (before I posted here) I always got > error messages. Have to try again. You can also post/send bug reports. Tobi -- * peace&love. * http://www.pinkjuice.com/