Hi, I need to output the following in an rxml template:
-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
what I am struggling with are the text lines:
xml.coordinates do
#what goes here?
end
I experimented with xml.text! but I could not find a way to preserve the
indentation and get the linebreaks
Thanks for any help!
Ingo
Ingo W. wrote:
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” ?
–
Phlip
Test Driven Ajax (on Rails) [Book]
“Test Driven Ajax (on Rails)”
assert_xpath, assert_javascript, & assert_ajax
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…)
Thanks!
Ingo
Ingo W. 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:
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