# File lib/rbrainz/webservice/mbxml.rb, line 83
      def get_entity_list(entity_type, ns=Model::NS_MMD_1)
        # Search for the first occuring node of type entity which is a child node
        # of the metadata element.
        entity_list = @document.elements[
          "//[local-name()='metadata' and namespace-uri()='%s']/[local-name()='%s-list' and namespace-uri()='%s'][1]" %
            [Model::NS_MMD_1, Utils.entity_type_to_string(entity_type), ns]]
        
        unless entity_list.nil? or entity_list.is_a? REXML::Text
          collection = Model::ScoredCollection.new(entity_list.attributes['count'],
                                                   entity_list.attributes['offset'])
          # Select the method to use for reading the list.
          read_list_method = method('read_' + entity_list.name.gsub('-', '_'))
          
          # Read the entity list and store the entities in the collection.
          read_list_method.call(entity_list, collection, true) if read_list_method
          
          return collection
        else
          return Model::ScoredCollection.new
        end
      end