Store data in db from XML

Hi All...

I am trying to parsing data from XML. But, I am not able to store it in database. So, any one can help me out???

Thanks in advance....

What is the problem that is preventing you from storing it in the db?

Colin

Data is a reserved word in rails (see http://wiki.rubyonrails.org/rails/pages/ReservedWords). I suggest using a different name for the model.

Colin

Would it be better to have the new and the save inside the loop so that you make a new one and save it for each item? At the moment you make a new object, loop round rewriting the values in @abc each time, then save it once.

I presume you realise that the paginate call mean that will only get 5 at a time?

Also it might be worthwhile studying the rails guide on Debugging Rails Apps at http://guides.rubyonrails.org/ The techniques there may help you to identify this sort of problem yourself.

Colin