open-uri and sax parsing for a giant xml document
问题 I need to connect to an external XML file to download and process (300MB+). Then run through the XML document and save elements in the database. I am already doing this no problem on a production server with Saxerator to be gentle on memory. It works great. Here is my issue now -- I need to use open-uri (though there could be alternative solutions?) to grab the file to parse through. This problem is that open-uri has to load the whole file before anything starts parsing, which defeats the