def guess_format(text):
    """Guess YANG/YIN format

    If the first non-whitespace character is '<' then it is XML.
    Return 'yang' or 'yin'"""
    for char in text:
        if not char.isspace():
            if char == '<':
                return 'yin'
            break
    return 'yang'