def get_file_date(tree):
    """
    Get publication date from dta file xml tree. 
    :param tree: the xml tree
    :return: int, the publication date
    """
    
    date = tree.find("{http://www.dspin.de/data/metadata}MetaData/{http://www.dspin.de/data/metadata}source/{http://www.clarin.eu/cmd/}CMD/{http://www.clarin.eu/cmd/}Components/{http://www.clarin.eu/cmd/}teiHeader/{http://www.clarin.eu/cmd/}fileDesc/{http://www.clarin.eu/cmd/}sourceDesc/{http://www.clarin.eu/cmd/}biblFull/{http://www.clarin.eu/cmd/}publicationStmt/{http://www.clarin.eu/cmd/}date").text    
    return date