text output in rxml (builder)

Ingo Weiss wrote:


what I am struggling with are the text lines:

xml.coordinates do
#what goes here?

    xml << '-122...' # right?


<< goes in with no translation.

I experimented with xml.text! but I could not find a way to preserve the
indentation and get the linebreaks

What about xml.text! "-122...\n" ?

Ingo Weiss wrote:

What about xml.text! "-122...\n" ?

This worked, but I had to manually add spaces to get the indentation (not that that would be terribly important, but...)

Maybe if you use the """ (multiline string) or << (here doc) operator it will keep the indentation?


What about xml.text! "-122...\n" ?

I'm having an extra problem now, I'm doing this:
xml.Data 'ss:Type' => 'String' do
  xml.text! format_excel_html(block_content)

Now it works, but the output is like this:
bla bla bla

The problem I have is the whitespace the builder creates around my
content. Does anyone know a trick to get rid of this whitespace?

Thanks, Onno