Updating xml file using c
After that i want to be able to read every I do not want to work with Grid View. Save("c:/add.xml"); //remove the added element and save to Xml Element root = doc. My purpose is to give some textboxes to the user so that he can write some information that i want save on the XML file. Inner Xml = "somecomputer"; should be elem List. Inner Text = "Some Computer; Anyway, I appreciate your warm-heart help. Get Elements By Tag Name("Machine"); for (int i=0; i Thank you very much. But you made a mistake: In my sample xml file: elem List[i]. Inner Xml = "somecomputer"; should be elem List. Inner Text = "Some Computer; Anyway, I appreciate your warm-heart help. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site. I already implemented to create the XML file below with Xml Text Writer when application initialization.
From the xmlfile source and the xmlfile_modification source: xmlfile Previously an extension of the base file resource type, now a partial reimplementation with the deprecation of :parent.
Get Elements By Tag Name("Machine"); for (int i=0; i If you want to preserve white spaces and indentation when saving, use this technique: 1.
Load(); Now, choose the most suitable method for you to find the elements or attributes you want to change: // For example: Xml Node List elem List = xml Document . Hope this helps too Moty Michaely a scris: Hi, Use Xml Document to load the xml and then navigate through it to find the element that contains the value you want to change.
Additional the user may create new records using some text fields and a button.
And also you can load xml document into Xml Document and XPath to update xml files here is an example: "); //Create a new node and add it to the document.