Hi Aya Tharwat,
 
Please check the below link:
https://techfunda.com/howto/310/export-data-into-xml-from-mvc
 
I hope this will help you.