def enumerate_records(xml)
      doc = Nokogiri::XML(xml)
      doc.root.add_namespace_definition('nmbib', PRIMO_NS)
      doc.xpath('//sear:DOC').lazy.map do |record|
        identifier = record.xpath('./nmbib:PrimoNMBib/nmbib:record/' \
                                  'nmbib:control/nmbib:recordid')
                     .first.text

        record = record.dup
        record.add_namespace_definition('sear', SEAR_NS)

        @record_class.build(mint_id(identifier), record.to_xml)
      end
    end
def enumerate_records(xml)
      doc = Nokogiri::XML(xml)
      doc.root.add_namespace_definition('nmbib', PRIMO_NS)
      doc.xpath('//sear:DOC').lazy.map do |record|
        identifier = record.xpath('./nmbib:PrimoNMBib/nmbib:record/' \
                                  'nmbib:control/nmbib:recordid')
                     .first.text

        record = record.dup
        record.add_namespace_definition('sear', SEAR_NS)

        @record_class.build(mint_id(identifier), record.to_xml)
      end
    end
Extract a page's worth of records from a Primo XML search result.
 @param xml [String] an XML document returned from a Primo search
 @return [Array] an array of @record_class instances