Please check the code. I'm getting this error even after using doc.Load() function.
Application.DoEvents();
XmlDocument xmldoc = new XmlDocument();
XmlNodeList xmlnode;
FileStream fs = new FileStream(file, FileMode.Open, FileAccess.Read);
xmldoc.Load(fs);
xmlnode = xmldoc.GetElementsByTagName("Source");
Check the code in : https://pastebin.com/4U7qa1L4
Remove all the extra hidden files from XML folder. It should not contain any files other than ".xml". Also you have to use xmlfile.Load()
instead of xmlfile.xmlLoad()
.