Question: how to export data from sql server to xml file?
Answer: Open SQL Server Management Studio and connect to the database.
Go to "Object Explorer", find the server database you want to export in CSV. ... 
Now, you need to click on the Data source drop-down button to choose the data source you want to copy.