And before going to updating logic, have you been able to read/parse?
If you want to update those nodes seperately you would have to open the xml yourself (append mode), navigate to your nodes, change them, and save it back...
line has to be moved by one byte in the file, so almost the whole file has to be rewritten.
My XML file looks like: And I'd like to be able to change the value of an XAttribute that's already in the file.
This is how I'm writing the file: XElement x Element; x Element = new XElement("Orders"); XElement element = new XElement( "Order", new XAttribute("Quantity", Quantity), new XAttribute("Part No", Part No), new XAttribute("Description", Description), new XAttribute("Discount", Discount), new XAttribute("Freight", Freight), new XAttribute("Unit Value", Unit Value), new XAttribute("Line Total", Line Total) ); x Element.
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.
After that i want to be able to read every I do not want to work with Grid View.
I'm trying to figure out how I can go about updating my XML file.
I know how to read and write, but no idea how to update an existing record.
Also another alternative is As I understand you need to add/delete/update the xml file. After that i want to be able to read every text ( see xml file) to buid an text file like this: The Distinguished Gentleman; Her Alibi; Other People's Money I personally would use xsd to generate the stub classes for your XML fragment, then use the XMLSerializer class to serialise and deserialise the data back and forth.
A simple way is to load xml into Data Set then bind the Data Set to Grid View so you can edit XML files using Grid View. Once you get the stubs, then its actually a very neat way of doing it. id=53 I would download the source code as the HTML formatting is a little skew on that site.
Because Xml Importer is actually a wrapper for Intermediate Serializer, it is certain that the XML file will be in the correct format to be deserialized by the same facility. The properties of the Xml Writer Settings class can be used to specify its output properties.