views:

81

answers:

1

Hi can i create a custom XML after filling a form in Ruby on rails view template.

Once i m done with capturing data i dono how to create an XML?

Could anyone help

What is exactly rxml and can I use it ?

A: 

Try Builder to generate your XML:

require "builder"

@xml = Builder::XmlMarkup.new
@xml.intruct!
@xml.mydoc do
    @xml.property "Data"
end
floatless
Hi thanks,Aother question .I have created a dummy model class which is not extending active recordclass RamOne attr_accessor :name,:city end Controller def start @ramone = RamOne.new end def load_new @ramone = RamOne.new(params[:ramone]) if @ramone.save redirect_to :action => ‘gen_xml’ end end def gen_xml @xml = Builder::XmlMarkup.new @ramones = RamOne.find(:all) render :layout => false endView captures name,city and has a submit action attached with load_newerror : wrong num of args(1 for 0 ) in load_new what is wrong?