0

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 ?

1 Answer 1

1

Try Builder to generate your XML:

require "builder"

@xml = Builder::XmlMarkup.new
@xml.intruct!
@xml.mydoc do
    @xml.property "Data"
end
Sign up to request clarification or add additional context in comments.

1 Comment

Hi thanks, Aother question .I have created a dummy model class which is not extending active record class 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 end View captures name,city and has a submit action attached with load_new error : wrong num of args(1 for 0 ) in load_new what is wrong?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.