> require 'rexml/document'
> doc = REXML::Document.new("<root><kid>hello world</kid></root>")
> p REXML::XPath.first( doc, '/root/kid/text()' )
> #=> "hello world"

Thanks for that, I'm now using REXML::XPath with a combination of .first 
and .match to pull the element text out.

One more thing, given an XML document...

<root><kid stuff="some-other-text">hello world</kid></root>

What would be the path to the attribute 'stuff' and return 
'some-other-text'?

Paul

-- 
Posted via http://www.ruby-forum.com/.