From: sera@... (Francis Hwang) Date: 2004-02-09T10:40:23+09:00 Subject: Re: Creating mixed content elements in REXML sera@fhwang.net (Francis Hwang) wrote in message news:<7b561b93.0402041638.4ede5c53@posting.google.com>... > Say I have a string that represents an XML element that I want to > embed into a REXML::Element, how would I do this? > > For example, if I have: > > xhtml_elt = REXML::Element.new( 'xhtml' ) > xhtml_string = "
foo bar
" > > Is there a way I could get to: > > puts xhtml_elt.to_s > =>foo bar
foo bar
" => "foo bar
" irb(main):003:0> REXML::Document.new( string ).root.to_s => "foo bar
"