# Raw data in xml

**URL:** <https://www.ruby-forum.com/t/raw-data-in-xml/185598>\
**Category:** Ruby\
**Created:** [March 23, 2010, 8:41am UTC](https://www.ruby-forum.com/t/raw-data-in-xml/185598 "2010-03-23T08:41:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Don\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f04885/32.png) [@Don\_F](https://www.ruby-forum.com/u/Don_F)\
**Post date:** [March 23, 2010, 8:41am UTC](https://www.ruby-forum.com/t/raw-data-in-xml/185598/1 "2010-03-23T08:41:38Z")

</div>

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.
