class Fedora::Repository

def convert_xml(response)

def convert_xml(response)
  results = FedoraObjects.new
  return results unless response && response['resultList']
  results.session_token = response['listSession']['token'] if response['listSession']
  objectFields = response['resultList']['objectFields']
  case objectFields
    when Array
      objectFields.each { |attrs| results << FedoraObject.new(attrs.rekey!) }
    when Hash
      results << FedoraObject.new(objectFields.rekey!)
  end
  results.each {|result| result.new_object = false}
  results
end