[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby and XML

something.rotten

6/14/2006 3:50:00 PM

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

2 Answers

Robert Klemme

6/14/2006 9:03:00 PM

0

something.rotten@gmail.com wrote:
> 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

something.rotten

6/15/2006 12:33:00 PM

0

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 >.<