XElement[] xes = new XElement[10];
var xel = new XElement("Roots",
from files in model.files
select new XElement("RootFiles",
new XElement("File", new XAttribute("path", "~/UploadedFiles/"), new XAttribute("file", files.FileName)
))); //creating the xml file with file name and path data in it