I\'ve got a Rails controller which is going to output a hash in XML format - for example:
class MyController < ApplicationController # GET /example.xml de
I think if you're converting an object to XML, you need a tag which wraps everything, but you can customise the tag name for the wrapper:
def index @output = {"a" => "b"} respond_to do |format| format.xml {render :xml => @output.to_xml(:root => 'output')} end end
Which will result in:
b