private static string GetConfigValue(XmlDocument doc, string name) { var node = doc.SelectSingleNode("config/" + name); return node == null ? null : node.InnerText; }