From: Gavin Kistner Date: 2005-12-22T22:52:38+09:00 Subject: Re: rexml - get raw xml of elements and text On Dec 20, 2005, at 4:51 PM, Ammon Christiansen wrote: > I'm aware that REXML's Element class can give me the elements or > the text > (texts if there are many text elements between children elements). > I want > them both, and I want them in order, straight XML. (I've got some > bold and > italic tags there that are just for formatting) irb(main):001:0> require 'rexml/document' => true irb(main):002:0> d = REXML::Document.new( 'Hello there world' ) => ... irb(main):003:0> d.root.each_child{ |n| p n } "Hello " ... " world" => ["Hello ", ... , " world"]