public string GetValue(string key) { XmlElement element = (XmlElement)DOC.SelectSingleNode("Game/" + key); if (element != null) { return(element.Attributes["value"].Value); } return(string.Empty); }
public void SetValue(string key, string value) { XmlElement element = (XmlElement)DOC.SelectSingleNode("Game/" + key); if (element == null) { return; } element.SetAttribute("value", value); DOC.Save(XmlFilePath); }