Forum: Ruby on Rails Reading XML-file + saving to sqlite3 database

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9cab5d0b17b89f091202d20d52a81bad?d=identicon&s=25 washi (Guest)
on 2009-03-16 13:46
(Received via mailing list)
Hi!

I'm new with Ruby On Rails, so I don't really know how I can get this
fixed.
As a result of a program, I've got +/- 20 XML files, and I would like
to import them to my sqlite3 database. Each XML-file having it's own
table.

Now I think I need to read the xml-files first and process them later.
I've done some research and found REXML, but I can't get it working
correctly.
With "@cust_xml_string = File.read("CUST.xml")", and debug
(@cust_xml_string)  i've been able to show the content of the xml on
the screen.

I've also been using 'Hash.create_from_xml', but then I get the
following error: 'undefined method `create_from_xml' for Hash:Class'
And I think REXML is faster, isn't it?

Now I'm a little bit stuck and confused on how to work further.

Thx!
This topic is locked and can not be replied to.