The retention period for e-invoices (XML file is the original invoice), as for analogue invoices, is 10 years. This is for how long you must retain the relevant documents securely and digitally.