lxml cannot parse XML files starting with a BOM
    (see http://www.w3.org/TR/2000/REC-xml-20001006 in F.1.)
    In case such XML file is used, we must skip these characters
    So we open all XML files for read with 'xmlFile'.
    TODO: File this issue to lxml ML or tracker (feature or bug ?)

    :param path: The path to the file
    :param mode: Mode for opéning the file

def xmlFile(path, mode='r'):
    """lxml cannot parse XML files starting with a BOM
    (see http://www.w3.org/TR/2000/REC-xml-20001006 in F.1.)
    In case such XML file is used, we must skip these characters
    So we open all XML files for read with 'xmlFile'.
    TODO: File this issue to lxml ML or tracker (feature or bug ?)

    :param path: The path to the file
    :param mode: Mode for opéning the file
    """
    fh = file(path, mode)
    while fh.read(1) != '<': # Ignoring everything before '<?xml...'
        pass
    fh.seek(-1, 1)
    return fh