I am reading xml from xxx URl but i am getting error as Root element is missing.
My code to read xml response is as follows:
XmlDocument doc = new
Hi this is odd way but try it once
XMLDocument.LoadXML(xmlstring)I try with your code and same XML without adding any XML declaration it works for me
XmlDocument doc = new XmlDocument();
doc.Load(@"H:\WorkSpace\C#\TestDemos\TestDemos\XMLFile1.xml");
XmlNodeList nodes = doc.GetElementsByTagName("Product");
XmlNode node = null;
foreach (XmlNode n in nodes)
{
Console.WriteLine("HI");
}