I don't know precisely how you can do it - but ruby has a built in XML parser for databases. Though changing schema over time is a bit annoying (and bad practices as well in my opinion) You can't set up your database to deal with a changing schema. On Monday, November 3, 2014 8:21:39 AM UTC-8, Frederick Cheung wrote: > > > > On Sunday, November 2, 2014 3:01:41 PM UTC, Gane R wrote: >> >> Hi all, >> >> I have an requirement of parsing an xml to db. >> >> XML file has a schema and it is subjected to change over a period of >> time. I want to know how to map this xml to Database table. >> >> Is this something like XSD to Dynamic class to ActiveRecord. I am new to >> this. How can I do this please suggest the me the methodology to follow or >> the gems can I use. >> >> > If the attributes will change over time then you'll either have to write > migrations for this as it happens or use some form of serialization for the > variable data ( hstore or json in postgres, rails serialization etc.). Also > worth considering whether a relational model is the best fit for your data. > > Fred > >> >>
-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/46b62f73-94dc-4f97-ac21-00f222f120b0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

