public static void UpdateElement(ref XmlDocument XMLDocument, string Xpath, string newValue) { XMLDocument.SelectSingleNode(Xpath).InnerText = newValue; }