Getting xml file display as xml when using render :text

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

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