Hi,
I have an xml file and I want to display(render) it as it is to the user, i.e I want to keep the tags. How should I do in RoR?
I have tried render :file=>"/path/to/file.xml"
, but the tag <product>
disappeared.
//file.xml
<product>car</product>
Update: I found the behavior is browers-dependent
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008101315 Ubuntu/8.10 (intrepid) Firefox/3.0.3
The tags are kept.
Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.15) Gecko/2009101601 Firefox/3.0.15
The tags disappeared.