How to create XML

hi

I wanna crate XML file in this format.

214 205 14 44 21 241 14

when I user
render :xml => @service

then it pick all the data from the table and show. But the format is not
what I want.

my table name is service-enquiries.

6 2009-06-22

How I change the format?

radhames brito wrote:

user builder to build your xml template and render the template

create a file service.xml.builder in the view directory for that
controller

then

xml.rsp(:status_code => “0”, :status_message=> “Success”)
xml.daily_counts
@services.each do |service|
xml.count(service.code,:date=> service.date)
end
end

then render => “services”
there you have it

214 205 14 44 21 241 14

Hi radhames brito

thanx for your support.
Can you give the link from where I learn more. How to create XML.

what you tell me above is very nice. But I wanna know how it is working.

so pls if possible give me the link.

http://api.rubyonrails.org/classes/ActionView/Base.html

radhames brito wrote:

http://api.rubyonrails.org/classes/ActionView/Base.html

thank u radhames brito. If I get any problem in this. I’ll again disturb
u.

user builder to build your xml template and render the template

create a file service.xml.builder in the view directory for that
controller

then

xml.rsp(:status_code => “0”, :status_message=> “Success”)
xml.daily_counts
@services.each do |service|
xml.count(service.code,:date=> service.date)
end
end

then render => “services”
there you have it

214 205 14 44 21 241 14

oh please do.