Use RuntimeEnvironment.SystemConfigurationFile to get machine.config location:
XmlDocument doc = new XmlDocument();
doc.Load(RuntimeEnvironment.SystemConfigurationFile);
Also why not to use Linq to Xml?
XDocument xdoc = XDocument.Load(RuntimeEnvironment.SystemConfigurationFile);
var element = xdoc.XPathSelectElement("//Custom/Level3/add[@value='s2']");
if (element != null)
key = (string)element.Attribute("key");