I’ve been playing around with CouchDb, and to that end I’ve been writing a little Ruby app to suck the DMOZ directory database into CouchDb, to see how it performs and get a feel for CouchDb’s idioms.
To do that I was using Libxml-Ruby, which is the closest thing to a performant XML API Ruby has. I ran into an issue using the XML::Reader object, which reads an XML file as a stream of nodes sort of like a pull version of a SAX parser.
I had my test code running great, only it would seemingly at random crash with: