Ruby and XML

S

something.rotten

Hi Guys,

I've been googling around about this a bit tonight and so far haven't
really come across what I'm after.

What I want to do is create a Ruby on Rails app that uses a set of xml
files instead of a database. (e.g., it will select the file
username-datetime.xml instead of selecting a row in a database). Any
idea what is going to be the best way to do this or any good resources
on finding out about it? It's basicall going to be a blogging system
with some bits and bobs im working on within it. So in the end I want
to be able to grab certain parts to create the page and certain parts
to create the rss feed, etc.

Thanks Guys.
~Chris
 
R

Robert Klemme

Hi Guys,

I've been googling around about this a bit tonight and so far haven't
really come across what I'm after.

What I want to do is create a Ruby on Rails app that uses a set of xml
files instead of a database. (e.g., it will select the file
username-datetime.xml instead of selecting a row in a database). Any
idea what is going to be the best way to do this or any good resources
on finding out about it? It's basicall going to be a blogging system
with some bits and bobs im working on within it. So in the end I want
to be able to grab certain parts to create the page and certain parts
to create the rss feed, etc.

Are you sure you want XML files as storage in the long run? Once you
discover that you want to connect data you'll probably start wanting a
relational database which allows to do this efficiently.

Other than that, you can use REXML with XPath queries.

Alternatively you could use Marshalling or PStore.

Kind regards

robert
 
S

something.rotten

Well, my recommendation was a PostgreSQL database for exactly that
reason, but I've got to convince my partner of the matter yet.

Still, he does well to convince me otherwise >.<
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top