From: SER Date: 2005-05-29T21:30:21+09:00 Subject: Re: Idiomatic way for collecting elements using REXML? > Aside: What possessed the author of the REXML library to put all the > XPath stuff in its own class with class methods? Why not simply Three things. First, XPath is not part of the XML spec -- it is its own spec, and has nothing to do with the tree (DOM) parser aside from the association an implementor makes. Second, because *someday*, you'll be able to use XPaths on things other than the DOM parser. But the primary reason is historical. There isn't really any reason why there couldn't be an Element#match function that delegates to an XPath instance. Suggestions for improvements are always welcome, although I warn you that I'm not prone to trolling the newsgroups for them. --- SER