Skip to content

Instantly share code, notes, and snippets.

@glebtv
Last active December 18, 2015 08:29
Show Gist options
  • Save glebtv/5754313 to your computer and use it in GitHub Desktop.
Save glebtv/5754313 to your computer and use it in GitHub Desktop.
require 'rubygems'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __FILE__)
require 'bundler/setup'
require 'zlib'
require 'ox'
class Parser < ::Ox::Sax
end
file = "/discogs/discogs_20130601_artists.xml.gz"
Zlib::GzipReader.open(file) do |f|
handler = Parser.new
Ox.sax_parse(handler, f)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment