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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Use something else to interact with the XML. Take a closer look at the Rest on Rails and Accepting XML articles
ASKER
Hmmm - I was hoping to use the yml file, but that's apparently a limitation of ruby.
ASKER
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?