Hi, is there an easy to render a page as XML/JSON instead of HTML? &nbsp;For example, I would like to send back the collection as XML document. &nbsp;Thus, I&#39;m looking for something similar to Rails respond_to whereas<div><br></div>
<div><span class="Apple-style-span" style="color: rgb(102, 102, 102); font-family: -webkit-monospace; font-size: 10px; line-height: 20px; white-space: pre; ">def show</span></div><div><span class="Apple-style-span" style="color: rgb(102, 102, 102); font-family: -webkit-monospace; font-size: 10px; line-height: 20px; white-space: pre; ">
    @order = Order.find(params[:id])
<br></span></div><div><span class="Apple-style-span" style="color: rgb(102, 102, 102); font-family: -webkit-monospace; font-size: 10px; line-height: 20px; white-space: pre; ">    respond_to do |format|
      format.html # show.rhtml
      format.xml  { render :xml =&gt; @order.to_xml }</span></div><div><span class="Apple-style-span" style="color: rgb(102, 102, 102); font-family: -webkit-monospace; font-size: 10px; line-height: 20px; white-space: pre;">      format.js { render :json =&gt; @order.to_json }</span></div>
<div><span class="Apple-style-span" style="color: rgb(102, 102, 102); font-family: -webkit-monospace; font-size: 10px; line-height: 20px; white-space: pre; ">    end</span></div><div><span class="Apple-style-span" style="color: rgb(102, 102, 102); font-family: -webkit-monospace; font-size: 10px; line-height: 20px; white-space: pre; ">
end</span></div><div><span class="Apple-style-span" style="color: rgb(102, 102, 102); font-family: -webkit-monospace; font-size: 10px; line-height: 20px; white-space: pre;"><br></span></div><div><span class="Apple-style-span" style="color: rgb(102, 102, 102); font-family: -webkit-monospace; font-size: 10px; line-height: 20px; white-space: pre;">Thanks in advance,</span></div>
<div><span class="Apple-style-span" style="color: rgb(102, 102, 102); font-family: -webkit-monospace; font-size: 10px; line-height: 20px; white-space: pre;"><br></span></div><div><span class="Apple-style-span" style="color: rgb(102, 102, 102); font-family: -webkit-monospace; font-size: 10px; line-height: 20px; white-space: pre;">-Conrad</span></div>
<div><div><br></div></div>