Nested tags with contents in RXML


#1

Hi,

I’m trying to get

foo
bar

with RXML.

xml.a(‘foo’) {
xml.b(‘bar’)
}

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 M.


#2

I think something like this should work:

xml.a {
xml.text! ‘foo’
xml.b(‘bar’)
}

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

b