On Fri, May 16, 2014 at 4:10 AM, Sayth Renshaw <[email protected]> wrote:
> I am trying to gather some information so I can learn what I need to do. > My goal is to download an xml file from a sporting body, clean the file > to remove useless/uneeded info and then consistently update it into the > database to display on my site. > > Since the XML will only update a subset of my database tables, I am > wondering how I create a consistent and reliable method of imoprting the > data into my database. > > I am using nokogiri at the moment to play around with editing files, but > what format and what requirements and tools do I need to acheive this? All you really need is Nokogiri for dealing with the XML. You can use http://ruby-doc.org/stdlib-2.1.1/libdoc/open-uri/rdoc/OpenURI.html to fetch the file. Do you want to just store the raw XML, or use the data in it to create model objects to persist? If you want "consistent and reliable" the latter may be best since you can use validations on your imported data. Good luck, -- Hassan Schroeder ------------------------ [email protected] http://about.me/hassanschroeder twitter: @hassan -- 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/CACmC4yA64WDnoGNNt4GBKwy35hHJ3FQXr-%3DYXm3C%2BBw6pSspSQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

