docs: def parseresponse(self, xml, localroot = False):
          """Parses CLAM XML, there's usually no need to call this directly"""
          root = parsexmlstring(xml)
          if root.tag != 'clam':
              raise FormatError("CLAM root tag not found")
  
          self.system_id = root.attrib['id']
          self.system_name = root.attrib['name']
          if 'project' in root.attrib:
              self.project = root.attrib['project']
          else:
              self.project = None
          if 'baseurl' in root.attrib:
              self.baseurl = root.attrib['baseurl']
              if self.project:
                  if localroot is True: #implicit, assume CWD
                      self.remote = False
                      self.projecturl = '' #relative directory (assume CWD is project directory, as is the case when wrapper scripts are called)
                  elif localroot: #explicit
                      self.remote = False
                      self.projecturl = localroot + '/' + self.project + '/' #explicit directory
                  else:
                      self.remote = True #no directory: remote URL
                      self.projecturl = self.baseurl + '/' + self.project + '/'
  
          if 'user' in root.attrib:
              self.user = root.attrib['user']
          else:
              self.user = None
  
          self.oauth_access_token = ""
          if 'oauth_access_token' in root.attrib:
              self.oauth_access_token = root.attrib['oauth_access_token']
  
          for node in root: #pylint: disable=too-many-nested-blocks
              if node.tag == "description":
                  self.description = node.text
              elif node.tag == "version":
                  self.system_version = node.text
              elif node.tag == "email":
                  self.system_email = node.text
              elif node.tag == 'status':
                  self.status = int(node.attrib['code'])
                  self.statusmessage  = node.attrib['message']
                  self.completion  = node.attrib['completion']
                  if 'errors' in node.attrib:
                      self.errors = ((node.attrib['errors'] == 'yes') or (node.attrib['errors'] == '1'))
                  if 'errormsg' in node.attrib:
                      self.errormsg = node.attrib['errormsg']
              elif node.tag == 'parameters':
                  for parametergroupnode in node:
                      if parametergroupnode.tag == 'parametergroup':
                          parameterlist = []
                          for parameternode in parametergroupnode:
                              if parameternode.tag in vars(clam.common.parameters):
                                  parameterlist.append(vars(clam.common.parameters)[parameternode.tag].fromxml(parameternode))
                              else:
                                  raise Exception("Expected parameter class '" + parameternode.tag + "', but not defined!")
                          self.parameters.append( (parametergroupnode.attrib['name'], parameterlist) )
              elif node.tag == 'corpora':
                  for corpusnode in node:
                      if corpusnode.tag == 'corpus':
                          self.corpora.append(corpusnode.value)
              elif node.tag == 'profiles':
                  for subnode in node:
                      if subnode.tag == 'profile':
                          self.profiles.append(Profile.fromxml(subnode))
              elif node.tag == 'input':
                  for filenode in node:
                      if filenode.tag == 'file':
                          for n in filenode:
                              if n.tag == 'name':
                                  self.input.append( CLAMInputFile( self.projecturl, n.text, self.loadmetadata, self.client,True) )
              elif node.tag == 'output':
                  for filenode in node:
                      if filenode.tag == 'file':
                          for n in filenode:
                              if n.tag == 'name':
                                  self.output.append( CLAMOutputFile( self.projecturl, n.text, self.loadmetadata, self.client ) )
              elif node.tag == 'projects':
                  self.projects = []
                  for projectnode in node:
                      if projectnode.tag == 'project':
                          self.projects.append(projectnode.text)
              elif node.tag == 'program':
                  self.program = Program(self.projecturl, [ int(i) for i in node.attrib['matchedprofiles'].split(',') ] )
                  for outputfilenode in node:
                      if outputfilenode.tag == 'outputfile':
                          inputfound = False
                          for inputfilenode in outputfilenode:
                              if inputfilenode.tag == 'inputfile':
                                  inputfound = True
                                  self.program.add(outputfilenode.attrib['name'],outputfilenode.attrib['template'],inputfilenode.attrib['name'], inputfilenode.attrib['template'])
                          if not inputfound:
                              self.program.add(outputfilenode.attrib['name'],outputfilenode.attrib['template'])