src/streamlink/plugin/api/validate.py
def xml_find(xpath):
    """Find a XML element via xpath."""
    def xpath_find(value):
        validate(ET.iselement, value)
        value = value.find(xpath)
        if value is None:
            raise ValueError("XPath '{0}' did not return an element".format(xpath))

        return validate(ET.iselement, value)

    return transform(xpath_find)
def xml_find(xpath):
    """Find a XML element via xpath."""
    def xpath_find(value):
        validate(ET.iselement, value)
        value = value.find(xpath)
        if value is None:
            raise ValueError("XPath '{0}' did not return an element".format(xpath))

        return validate(ET.iselement, value)

    return transform(xpath_find)
def xml_find ( xpath ) : def xpath_find ( value ) : validate ( ET . iselement , value ) value = value . find ( xpath ) if value is None : raise ValueError ( "XPath '{0}' did not return an element" . format ( xpath ) ) return validate ( ET . iselement , value ) return transform ( xpath_find )
Find a XML element via xpath.
Find a XML element via xpath .