From: Austin Ziegler Date: 2004-02-06T02:15:18+09:00 Subject: Re: Creating mixed content elements in REXML On Thu, 5 Feb 2004 09:40:02 +0900, Francis Hwang wrote: > 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

xhtml_elt << REXML::Document.new(xhtml_string).elements[1] puts xhtml_elt.to_s -austin -- austin ziegler * austin@halostatue.ca * Toronto, ON, Canada software designer * pragmatic programmer * 2004.02.05 * 12.11.43