Hey,

Two notes:
1. I always suggest the REXML::XPath methods over the others for
people who grok XPath.
2. A REXML::XPath.* ... text() match will return a REXML::Text node,
which may _not_ be what you want:

$ irb --simple-prompt foo.rb
>> require 'rexml/document'
=> true
>> doc = REXML::Document.new("<root><kid>hello world</kid></root>")
=> <UNDEFINED> ... </>
>> REXML::XPath.first( doc, '/root/kid/text()' )
=> "hello world"
>> REXML::XPath.first( doc, '/root/kid/text()' ).class
=> REXML::Text

Just something to be aware of (use .to_s if you want a string, as usual).


HTH,
Keith