How do I setup Ruby on Rails to use XML/web pages as the database?

Hi.

I'm using ruby on rails for a web application that will take text from a xml-web page, parse it, and return it to the user as a formatted file. I only need read access to the xml, not write. How do I setup a ruby on rails application so that, rather than the default settings for mysql, it knows to look at the xml web page?

I know this is possible in php, python, etc., but I'd like to use rails, as I'm most familiar withit.

Specifically, I will be taking text from wikitravel.org, and the xml page (for example) is http://wikitravel.org/en/Special:Export/Turkey
stoniergrunowAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

evangineerXCommented:
Use REXML.

You can find some REXML tutorials at:
http://www.xml.com/pub/a/2005/11/09/rexml-processing-xml-in-ruby.html
http://www.germane-software.com/software/rexml/docs/tutorial.html

An article that addresses a similar project to what you describe can be found at:
http://www.xml.com/pub/a/2005/11/02/rest-on-rails.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
stoniergrunowAuthor Commented:
OK - I looked at the links, but I was specifically wondering how I write the /config/database.yml file. Normally it looks something like:

development:
  adapter: mysql
  database: depot_development
  username: user
  password:
  host: localhost

Is it just a matter of substituting an xml adapter? Or do I leave this file untouched, and use something else to interact with the XML?
0
evangineerXCommented:
Use something else to interact with the XML.  Take a closer look at the Rest on Rails and Accepting XML articles
0
stoniergrunowAuthor Commented:
Hmmm - I was hoping to use the yml file, but that's apparently a limitation of ruby.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.