[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

SimpleXML for you

Aleksi

4/3/2005 6:40:00 PM

Here's my first version to bring PHP SimpleXML functionality into Ruby.

Few people claimed REXML isn't simple enough for them if they compare
that to PHP simple way. If you don't know what's the PHP way, here's an
introduction:

http://php.net...

Let me know what do you think about it.

This code is by no means feature complete or even usable. If this
matures and people feel the need for it, I'll package it properly. If
there's votes for it, maybe working version could be put on top of
REXML, maybe even included on it.

If I've understand correctly REXML is now bundled as a standard library.
If not, maybe SimpleXML should have multiple backends for most popular
libraries out there (NQXML, some of these C-based perhaps).

Here's the short documentation

http://www.cs.helsinki.fi/u/kaniemel/Simp...

for your perusal, and of course the few hundred lines of dispatching code:

http://www.cs.helsinki.fi/u/kaniemel/...

Thanks,

- Aleksi
2 Answers

Aleksi

4/3/2005 7:04:00 PM

0

Aleksi wrote:
> Here's my first version to bring PHP SimpleXML functionality into Ruby.

Let me say that I was just pointed there's already a lib with (almost)
same name:

http://raa.ruby-lang.org/project/ruby-x...

I'm not robbing name. I just picked it up from the PHP world. And this
lib name (if there's ever going to be one) will of course change. The
functionality of that lib is almost the same as mine. Syntax is not
completely same but close, and that version is written in C so it's
faster in magnitudes, I'd guess.

I see point of having pure-ruby simple API over other XML libs fading
away. Not completely of course, but at least there's something quite
dumb ass easy to use already out there.

- Aleksi

james_b

4/3/2005 7:30:00 PM

0

Aleksi wrote:
> Here's my first version to bring PHP SimpleXML functionality into Ruby.
>
> Few people claimed REXML isn't simple enough for them if they compare
> that to PHP simple way. If you don't know what's the PHP way, here's an
> introduction:
>
> http://php.net...
>
> Let me know what do you think about it.

Have you looked at XmlSimple?

http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-...
http://www.maik-schmidt.de/xml-s...

It appears to be based on Perl's XML::Simple.

It lets you access XML content as a series of hashes:

puts config['server']['kalahari']['address'][1]


James
--

http://www.ru...
http://www.r...
http://catapult.rub...
http://orbjson.rub...
http://ooo4r.rub...
http://www.jame...