Hi I am working on a project, in which I need to write xml to a file, this happens in a for loop,
that is
for(int i = 0; i < screens.length; screens++)
{
XMLDocument allScreens = new XMLDocument();
allScreens.Load(allScreeensPath);
XMLNode node = allScreens.Select("//Screen[@name='" + screens[i].name + "']");
allScreens.Remove(node);
allScreens.Add(nweNode);
allScreens.Save(allScreeensPath);
}
basicalyy the xml document is accessed, modified and saved in a for loop, this work some times. and some thimes I get the following error ,
I tries using text readers, text writers to do file operations( so that I can close, dispose the writers) but the error persists, Can anyone suggest as to how I can get through this ??
Thanks in Advance.