'Parse the job configuration XML.'

def __init__(self, app):

    self.app = app
    self.runner_plugins = []
    self.dynamic_params = None
    self.handlers = {}
    self.handler_runner_plugins = {}
    self.default_handler_id = None
    self.destinations = {}
    self.destination_tags = {}
    self.default_destination_id = None
    self.tools = {}
    self.resource_groups = {}
    self.default_resource_group = None
    self.resource_parameters = {}
    self.limits = Bunch()
    default_resubmits = []
    default_resubmit_condition = self.app.config.default_job_resubmission_condition
    if default_resubmit_condition:
        default_resubmits.append(dict(destination=None, condition=default_resubmit_condition, handler=None, delay=None))
    self.default_resubmits = default_resubmits
    self.__parse_resource_parameters()
    job_config_file = self.app.config.job_config_file
    try:
        tree = load(job_config_file)
        self.__parse_job_conf_xml(tree)
    except IOError:
        log.warning(('Job    configuration    "%s"    does    not    exist,    using    legacy    job    configuration    from    Galaxy    config    file    "%s"    instead' % (self.app.config.job_config_file, self.app.config.config_file)))
        self.__parse_job_conf_legacy()
    except Exception as e:
        raise config_exception(e, job_config_file)
