I try read xml file and doing something with xml. But I have a problem with loading a file to XmlDocument. Here isn't error. But when load, program crash and compiler say:
There is no Unicode byte order mark. Cannot switch to Unicode.
Here is my code:
Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
dlg.Filter = "xml (*.xml)|*.xml";
if (dlg.ShowDialog() == true){
XmlDocument doc = new XmlDocument();
doc.Load(dlg.FileName);