Matt Royer wrote in post #961585:
I have attached a ruby program built to get the xml data out of files
and display the text back to me on the screen. This program was built
from a few different sources, as I'm still new with the Ruby language.
But I have monkeyed around with it enough and have got it working how I
What I'm trying to do is get this information into a database so I can
search it using a web interface (through Rails of course).
Here is a sample of the data that is spit out to the screen when I run
//dc5/IP Office Calls/38/73/387398.xml
<starttime>2009-05-05 15:28:47:000 -0600</starttime>
<endtime>2009-05-05 15:32:50:000 -0600</endtime>
What is the best way to go about getting this info loaded into a
database? Should I created the table and fields first and then put all
of the info in a yaml file and seed the database (I might have some
questions on how to do that)? New xml files are getting dumped to these
folders all the time, so I'm looking for a nice way to get this info
into the database without too much hassle.
Then you don't want to seed the database -- seeding is only for
relatively static data (such as state and country names) that needs to
be loaded before you ever run the application. It sounds to me like you
simply want to read the XML files and build INSERT queries. And unless
I'm badly mistaken, you already know how to do that.
You may need a cron job or some such to parse new files as they come in.
I'm not sure how to make this data available to rails.
What's the problem, exactly? There's nothing here that you don't know.