I'm trying to write some code in C# and I have a problem with LoadFromXML function. Here's my code:
System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
path = Environment.CurrentDirectory;
<b>xmlDoc.LoadXml(path + "
" + fileName); //Exception</b>
refString = xmlDoc.InnerXml;
catch (Exception ex)
Msg("Load from XML failed: " + ex.Message);
In bolded line ecpetion appears: "The data at the root level is invalid. Line 1, position 1." . Does anyone know what to do with this?