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

Posted on 2006-04-21
Last Modified: 2012-06-27

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, and the xml page (for example) is
Question by:stoniergrunow
    LVL 3

    Accepted Solution

    Use REXML.

    You can find some REXML tutorials at:

    An article that addresses a similar project to what you describe can be found at:
    LVL 3

    Assisted Solution


    Author Comment

    OK - I looked at the links, but I was specifically wondering how I write the /config/database.yml file. Normally it looks something like:

      adapter: mysql
      database: depot_development
      username: user
      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?
    LVL 3

    Expert Comment

    Use something else to interact with the XML.  Take a closer look at the Rest on Rails and Accepting XML articles

    Author Comment

    Hmmm - I was hoping to use the yml file, but that's apparently a limitation of ruby.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
    The first time you look at a web page and its source code, you are probably a little intimidated by the use of symbols and jargon that really looks foreign to you. You might not even know where to start to begin learning what it all means. That’…
    This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
    The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now