public static void Main()
var xmldoc = @"<?xml version=""1.0"" encoding=""UTF-8""?><configuration><connectionStrings><add name=""XLayers"" connectionString=""Data Source=[ConnStringDataSource];"" providerName=""[ProviderName]"" /></connectionStrings><appSettings><add key=""Debug"" value=""True"" /></appSettings></configuration>";
var filedoc = new XmlDocument();
System.Xml.XmlNamespaceManager nsmgr = new System.Xml.XmlNamespaceManager(filedoc.NameTable);
System.Xml.XmlNodeList listOfNodes = filedoc.SelectNodes("//configuration/appSettings/add", nsmgr);
foreach (System.Xml.XmlNode row in listOfNodes)
key = row.Attributes["key"].Value;
Console.WriteLine("key = " + key);
value = row.Attributes["value"].Value;
Console.WriteLine("value = " + value);