Okay, here's the deal. I'm writing a program in c# that requires the user to enter information into textboxes. I want the user to be able to click a button and the information is instantly saved into an XML file, to be loaded later. I've found some tutorials on doing this, but the problem is that the ones I found simply add new nodes to an xml file. For example if we have the XML file below:
<login>
<user>Bob</user>
<pass>password</pass>
</login>
I want to be able to change the information for <user> and <pass>. The examples that I found all added new nodes onto the file and didn't edit the already existing ones.
Saving information with XML in C#
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
vinod36 pointsPosted Oct 31, 2008, 2:06 AM EDT
As per ur XML
<user>Bob</User>
<pass>password</password>
<user> ---> is ChildElement.
Bob----> is InnerText.
here ChldNodes retrives the all the childnodes, if u want to replace that u can Edit or Replace the Inner Text with Method ReplaceNodeAt()..
U can thy this....
Brandon7 pointsPosted Oct 31, 2008, 1:15 PM EDT
1 short reply
Brandon7 pointsPosted Oct 31, 2008, 1:03 PM EDT