Raw data in xml

I have a array of lines that are actually a final document that I need
to put into one XML file/buffer as one element including all newlines
and formfeed characters. Actually all control characters.

The snippet of XmlBuilder is:

x.report @lines[@first_line_index..-1].each { |line| "#{line}\n"}

originally tried:

x.report @lines[@first_line_index..-1].each { |line| "#{line}"}

When I look at the buffer created in both cases, there are no newlines
in the buffer.

How can I do that?

Don F.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs