From: Nobuyoshi Nakada Date: 2007-09-01T08:27:17+09:00 Subject: Re: REXML element reading
error Hi, At Sat, 1 Sep 2007 05:18:48 +0900, Keith Fahlgren wrote in [ruby-talk:266990]: > I'd suggest using a bit more XPath, both text() and a each {} to > iterate through the text nodes (which are distinct): > > $ irb -r rexml/document --prompt xmp > a = REXML::Document.new("123 street
amstown
amserland
") > # => ... > REXML::XPath.first(a, '//Site').text > # => "123 street" Seems like that just REXML::XPath.first(a, '//Site').to_s returns the whole content. -- Nobu Nakada