Link to home
Start Free TrialLog in
Avatar of stoniergrunow
stoniergrunow

asked on

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
ASKER CERTIFIED SOLUTION
Avatar of evangineerX
evangineerX

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of stoniergrunow
stoniergrunow

ASKER

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?
Use something else to interact with the XML.  Take a closer look at the Rest on Rails and Accepting XML articles
Hmmm - I was hoping to use the yml file, but that's apparently a limitation of ruby.