From: Dejan Dimic Date: 2008-07-20T07:39:51+09:00 Subject: Re: XML parser On Jul 19, 10:42 pm, Cédric H. wrote: > Hi guys, > > I'm looking for some information about the xml libraries available in > Ruby. > > I've read a few blog post about the pro's and con's of REXML and > Libxml but I still have some questions : > > - as I understand it REXML is part of ruby standard library and so is > included in ruby distribution ? > > - libxml is a wrapper for gnome libxml and must be installed and > compiled with gem ? > > - is libxml really a full validating and compliant parser ? > > - how do you use xslt in Ruby ? do you usehttp://raa.ruby-lang.org/project/ruby-xslt/ > orhttp://rubyforge.org/projects/libxsl/(if I'm right the second one > is part of libxml ? ) > > As you see I'm lost and I would really appreciate your help or some > comprehensive post about xml processing in ruby . > > Thanks ! > > Cedric Parsing, manipulating XML is such wide subject. There is a more then one bookshelf full with books about it. Doing it with Ruby is not an exception. Beside these two libraries mentioned there is also an Hpricot (http:// code.whytheluckystiff.net/hpricot/) and you should try it to. When dealing with XML you should consider the following questions: Who and on what OS the code will be running? How big the XML document is? Is the speed a decisive parameter? What’s the magnitude of manipulation required? Answers to these questions could help you pick the optimum library but you should be familiar with all of them. Do a research, play a little and pick the more appealing to you.