On Wed, Jul 30, 2003 at 11:17:59AM +0900, Joao Barros wrote:
> I am (still) ignorant about Ruby, but, from the very few things I
> read, it seems a very nice language. I would like to know some
> opinions regarding Ruby's suitability to parse XML files into an
> internal Ruby representation so that they can be manipulated by Ruby
> code and then written down to a new XML file.
> Is it a good idea to do it in Ruby? What about efficiency? Should I do
> it with C++ (with lots of templates ;-|) ? I already know quite a bit
> (?) of C++ and that is the reason why I am also considering it.
> 
> Thanks a lot in advance for any opinions. I need them!

There are several XML parsing libraries for Ruby; the one which seems most
popular (and has been integrated into Ruby-1.8.0, which should be finally
released in the next day or so) is called REXML.

I think you should try it - it will be about 100 times easier than writing
the equivalent C++ code :-)

Speed is something you'll have to try out for your application. If you are
parsing multi-megabyte XML files it might be an issue, but in the
applications I use it it's not a problem at all.

Regards,

Brian.