def _parse_xml(self, xml_string, video_id, transform_source=None, fatal=True):
    if transform_source:
        xml_string = transform_source(xml_string)
    try:
        return compat_etree_fromstring(xml_string.encode('utf-8'))
    except compat_xml_parse_error as ve:
        errmsg = ('%s: Failed to parse XML ' % video_id)
        if fatal:
            raise ExtractorError(errmsg, cause=ve)
        else:
            self.report_warning((errmsg + str(ve)))
def _parse_xml(self, xml_string, video_id, transform_source=None, fatal=True):
    if transform_source:
        xml_string = transform_source(xml_string)
    try:
        return compat_etree_fromstring(xml_string.encode('utf-8'))
    except compat_xml_parse_error as ve:
        errmsg = ('%s: Failed to parse XML ' % video_id)
        if fatal:
            raise ExtractorError(errmsg, cause=ve)
        else:
            self.report_warning((errmsg + str(ve)))