I have a code snippet :
XmlDocument doc = new XmlDocument(); try { doc.LoadXml(xmlPath); } catch (Exception ex) { string exMessage = ex.Message; }
Use doc.Load(xmlPath). LoadXML is for loading an XML string.