text output in rxml (builder)

Ingo Weiss wrote:

<coordinates>
-122.3662784465226,37.81884427772081,30
-122.3652480684771,37.81926777010555,30
-122.365640222455,37.81986126286519,30
-122.36666937925,37.81942987753481,30
-122.3662784465226,37.81884427772081,30
</coordinates>

what I am struggling with are the text lines:

xml.coordinates do
#what goes here?

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

end

<< 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?

b

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)
end

Now it works, but the output is like this:
<Data>
bla bla bla
</Data>

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