J
jon cosby
Not sure why this doesn't work. The node values are unchanged. Is there
something that needs to be done to accept the changes?
sXmlPath = Application.StartupPath.ToString() +
\\settings.xml";
XmlDocument xmlConfig = new XmlDocument();
xmlConfig.Load(sXmlPath);
XPathNavigator navigator = xmlConfig.CreateNavigator();
navigator.MoveToChild("timer", "");
navigator.MoveToChild("config", "");
navigator.MoveToChild("systrayenabled", "");
navigator.SetValue("true");
<timer>
<config user="default">
<systrayenabled>false</systrayenabled>
<systraytimer>1</systraytimer>
<logevents>false</logevents>
</config>
</timer>
something that needs to be done to accept the changes?
sXmlPath = Application.StartupPath.ToString() +
\\settings.xml";
XmlDocument xmlConfig = new XmlDocument();
xmlConfig.Load(sXmlPath);
XPathNavigator navigator = xmlConfig.CreateNavigator();
navigator.MoveToChild("timer", "");
navigator.MoveToChild("config", "");
navigator.MoveToChild("systrayenabled", "");
navigator.SetValue("true");
<timer>
<config user="default">
<systrayenabled>false</systrayenabled>
<systraytimer>1</systraytimer>
<logevents>false</logevents>
</config>
</timer>