# Getting xml file display as xml when using render :text

**URL:** <https://www.ruby-forum.com/t/getting-xml-file-display-as-xml-when-using-render-text/162056>\
**Category:** Rails\
**Created:** [March 5, 2009, 10:44am UTC](https://www.ruby-forum.com/t/getting-xml-file-display-as-xml-when-using-render-text/162056 "2009-03-05T10:44:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sudhi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@sudhi](https://www.ruby-forum.com/u/sudhi)\
**Post date:** [March 5, 2009, 10:44am UTC](https://www.ruby-forum.com/t/getting-xml-file-display-as-xml-when-using-render-text/162056/1 "2009-03-05T10:44:49Z")

</div>

Hi,

I have a problem when I do a

fd = File.open(“test”,“rb”)  
render :text fd.read

I the “test” file contains xml

dog  
cat

The output is shown as “dog cat” how do I get the xml shown as is with  
the animal tag also shown?

THanks,  
Sudhi
