I want to build xml from rails application. I wanted to generate tags from rails application database.
For example: I have a database table called cars and it have variable brand and it has values.
So I want to generate xml like this
<dodge> </dodge>
I tried by doing so
xml.cars.brand do
end
Create variable in the controller like this
brand = Car.find(id).brand
and then generate xml like below
xml.tag!(brand) do
end