def default_loader(href, parse, encoding=None):
    if parse not in "xml":
        file = open(href, 'rb')
        data = ElementTree.parse(file).getroot()
    else:
        if not encoding:
            encoding = 'UTF-8'
        file = open(href, 'r', encoding=encoding)
        data = file.read()
    file.close()
    return data

##
# Expand XInclude directives.
#
# @param elem Root element.
# @param loader Optional resource loader.  If omitted, it defaults
#     to {@link default_loader}.  If given, it should be a callable
#     that implements the same interface as <b>default_loader</b>.
# @throws FatalIncludeError If the function fails to include a given
#     resource, or if the tree contains malformed XInclude elements.
# @throws IOError If the function fails to load a given resource.
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/xml/etree/ElementInclude.py/default_loader/operator `==` -> `not in`