0
Reply

.NET1.1 Config Element not returning the right owner document?

rajul_mishra

rajul_mishra

Jun 14 2004 11:54 AM
1.9k
The following code works in 1.0 but not in 1.1. The InnerText, Inner/Outer Element are empty strings and the hasChildNodes returns false. XmlElement element = (XmlElement) System.Configuration.ConfigurationSettings.GetConfig("log4net"); XmlDocument doc = element.OwnerDocument; Console.WriteLine(doc.InnerText + " " + doc.InnerXml); Console.WriteLine(doc.OuterXml); Console.WriteLine(element.OwnerDocument.HasChildNodes); I am using VS2003 to build and run. I have added the App.Config file to the project and it gets renamed properly during compile.
Any help will be appreciated, Thanks, rajul