nested tags with contents in RXML


I'm trying to get

   <a> foo
     <b> bar </b>

with RXML.

   xml.a('foo') {

complains about contents and blocks not being usable together.
I think my XML is valid though. Is there a way to do this, or to trick RXML ?

Jean-Christophe Michel

I think something like this should work:

xml.a {
  xml.text! 'foo'

The text! method sets the arg as text content of the element...


Jean-Christophe Michel wrote: