I need to connect to an url to download and process an XML document.
Then run through the XML document and save elements in the database.
There are many howto’s on the internet regarding parsing xml files with
SAX opening a file on the filesystem and reading through it. But I could
not find an example of how to read an URL while processing the xml.
SAX will be useless if the content from the URL has to be downloaded
completely before processing it. The RAM will still fill up.
Is there somebody that has a solution for this problem or maybe a sample
snippet on how to deal with this in Ruby or Rails? I don’t care if it is
libxml, rexml or something else as long less RAM will be used.
Thanks for your help.