Hi,
I am developing a tool. that want to find the elements of xml file's and replace the contents. first i want ot find that the xml file contain DOCTYPE or not. if yes i want to change the values of that.
i tried this code. but got error,
var files = Directory.GetFiles(txtpath.Text);
foreach (var f in files)
{
//doc = XDocument.Load(f);XmlDocument xmldoc = new XmlDocument();xmldoc.LoadXml(f.Substring(f.IndexOf(Environment.NewLine))); // Error In this line.var node = xmldoc.SelectSingleNode("//DOCTYPE");if (node != null){}
//ele = XElement.Load(f);
}
how to do this. Thanks In Advance.
Karthi KeyanPosted Apr 26, 2017, 1:03 AM
Ashish VishwakarmaPosted Apr 26, 2017, 12:53 AM