XML Write node.LastChild.InnerText

LUCIENNECQ

New Member
I just have a quick question about writing a setting to a node in my xml file for some reason all my other settings save but this one and the value I am trying to save is (ListingRid=1+),(PictureCount=1+) in my code textBoxQuery.Text contains (ListingRid=1+),(PictureCount=1+)Example XML\[code\]<setting name="SearchQuery" serializeAs="String"><value></value></setting>\[/code\]And here is the code I call can anyone tell me if the value may have invalid characters maybe and that is why the setting is not saved?\[code\]XmlDocument doc = new XmlDocument();doc.Load(path);foreach (XmlNode node in doc.SelectNodes("//setting")){ if (node.OuterXml.Contains("SearchQuery")){ node.LastChild.InnerText = textBoxQuery.Text;}doc.Save(path); //I have this in there at the end.\[/code\]
 
Back
Top