I am trying to read the xml document using XDocument method . but i am getting an error when xml has
<?xml version="1.0" encoding="utf-16"?>
When i removed encoding manually.It works perfectly.
I am getting error " There is no Unicode byte order mark. Cannot switch to Unicode. "
i tried searching and i landed up here-->
But could not solve my problem.
My code :
XDocument xdoc = XDocument.Load(path);
Any suggestions ??
Thank you Tuzo, for the answer !!
I tried , and found another way of doing it !!
XDocument xdoc = XDocument.Parse(System.IO.File.ReadAllLines(path));
This think solved the problem.
Thank you everyone.