I have a List<> which I have managed to write into file.
Now I am trying to read the same file and write it back to List<>.
Is there a
you can use LINQ to XML to read your XML file and bind it to your List.
http://www.mssqltips.com/sqlservertip/1524/reading-xml-documents-using-linq-to-xml/ this link has enough info about it.
this is something I did in past; I hope it helps. I think you want to exactly same thing
public static List MapInfo()
{
var maps = from c in XElement.Load(System.Web.Hosting.HostingEnvironment.MapPath("/ProjectMap.xml")).Elements("ProjectMap")
select c;
List mapList = new List();
foreach (var item in maps)
{
mapList.Add(new ProjectMap() { Project = item.Element("Project").Value, SubProject = item.Element("SubProject").Value, Prefix = item.Element("Prefix").Value, TableID = item.Element("TableID").Value });
}
return mapList;
}