lib/onix/reader.rb
def each(&block)
      @reader.each do |node|
        if @reader.node_type == 1 && @reader.name == "Product"
          str = @reader.outer_xml
          if str.nil?
            yield @product_klass.new
          else
            yield @product_klass.from_xml(str)
          end
        end
      end
    end
def each(&block)
      @reader.each do |node|
        if @reader.node_type == 1 && @reader.name == "Product"
          str = @reader.outer_xml
          if str.nil?
            yield @product_klass.new
          else
            yield @product_klass.from_xml(str)
          end
        end
      end
    end
Iterate over all the products in an ONIX file