On Jan 26, 2006, at 8:18 PM, Mark Volkmann wrote: > On 1/26/06, Mark Volkmann <r.mark.volkmann / gmail.com> wrote: >> The documentation for REXML says is has full XPath 1.0 support. >> However, I can't see a way to get the XPath class to return values >> other than nodes. For example, if I have an XML document that >> contains >> "book" elements, I should be able to do something like this. >> >> count = XPath.evaluate(doc, count('//book')) > > Minor syntax correction here, > > count = XPath.evaluate(doc, 'count(//book)') > As a work-around, you could try this: count = XPath.match(doc, '//book').length REXML may just support XPath's selection syntax and not the pseudo- function-things like you're trying to use above. -- ~akk http://therealadam.com