# How to render xml

**URL:** <https://www.ruby-forum.com/t/how-to-render-xml/118665>\
**Category:** Rails\
**Created:** [October 29, 2007, 10:35pm UTC](https://www.ruby-forum.com/t/how-to-render-xml/118665 "2007-10-29T22:35:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/d6d6ee/32.png) [@luma](https://www.ruby-forum.com/u/luma)\
**Post date:** [October 29, 2007, 10:35pm UTC](https://www.ruby-forum.com/t/how-to-render-xml/118665/1 "2007-10-29T22:35:56Z")

</div>

hi

I’ve got quite long strings containing xml, and I’d like to render  
these xml codes inside an rhtml view in a nice way. That means  
automatical linebreaks etc. The string itself is nearly unreadable…

This cannot be done in the controller because I’d like to insert many  
such xml strings into my view.

I tried several kinds of render, but I didn’t get it.

Any help appreciated

Luma
