As per my understanding you can not add anything in XML file using XmlDocument outside the root element and which is <connectionStrings>. Other way to do that is to use File handling. Below is sample
string xml = File.ReadAllText(filename);
xml = "<configuration>" + xml + "</configuration>";
File.WriteAllText(filename, xml);