From: Ross Bamford Date: 2006-02-25T12:13:13+09:00 Subject: Re: LibXML-Ruby 0.3.6 On Sat, 2006-02-25 at 01:38 +0900, listrecv@gmail.com wrote: > Great! > > Could you please explain to us uninitiated the advantages (and > disadvantages) of this over REXML? I'll try, but I have to admit I've never made serious use of REXML. I think the main difference really is that REXML is implemented in Ruby, whereas LibXML-Ruby is a C-language binding to a native library (that being, somewhat confusingly I must admit, the Gnome LibXML2 library). The main upshot of this is speed, and supported functionality - most (though not all) operations are faster with LibXML-Ruby than with REXML, mainly due to the native implementation, but partly because LibXML2 is itself pretty quick too. Thanks to it's place in Gnome, LibXML2 also allows us to support a range of XML-related technologies that REXML doesn't (as far as I'm aware?), including stable support for namespaces, XPointer, XInclude, catalogues, and more. Obviously full support is present for XPath, too (as in REXML I think). Possibly more important than any of that depending on your usage is validation: LibXML2 (and by extension LibXML-Ruby) fully support DTD validation, and has some support for XML Schema (not exactly sure on the current status of this). I won't get into any 'our library is better than your library' discussions, because it's not about that - the two are different animals that happen to share a hunting ground. The reasons for choosing one or the other come down to a combination of your requirements in terms of performance, what you need to do with your XML, whether or not you can compile LibXML2 and extensions on your target platform, and your personal preference in terms of which API you prefer. -- Ross Bamford - rosco@roscopeco.REMOVE.co.uk