For me with a sample example works fine :
require 'rexml/document'
require 'rexml/xpath'
doc = REXML::Document.new("<p>some text <b>this is bold!</b> more text</p>")
REXML::XPath.each(doc, "*//b") { |element| puts element.text }
# >> this is bold!
See another example ;
require 'rexml/document'
require 'rexml/xpath'
str = <<-eot
<version>
<locale name="en-US">
<title>This is the Title</title>
<description>this is the description</description>
<keywords>
<keyword>this</keyword>
<keyword>that</keyword>
<keyword>the other</keyword>
</keywords>
</locale>
</version>
eot
doc = REXML::Document.new(str)
REXML::XPath.each(doc, "//title") { |element| puts element.text }
REXML::XPath.each(doc, "//keyword") { |element| puts element.text }
# >> This is the Title
# >> this
# >> that
# >> the other