Hi

I am using REXML to pull text from a NewsML document.

require 'rexml/document'
include REXML
file = File.new("Main_News.xml")
doc = Document.new(file)
root = doc.root
puts
root.elements["NewsItem/NewsComponent/NewsComponent[1]/NewsComponent/ContentItem/DataContent/nitf/body/body.head/hedline/hl1"]

Gives me...

<hl1>Blueprint to cut emissions unveiled</hl1>

Is there an easy way (ie something in REXML) to pull just the text
without the containers <hl1> and </hl1>.

Paul

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