>Writing a dataset to an XML file is a trivial task, but is it possible to append to an existing XML file?
>
>Einar
It is not possible to append to an existing file directly. Assuming that you want to add more rows from the dataset to the XML file, you can load the existing XML file into an XmlDocument or XmlDataDocument, then append an XML fragment of the new rows to the collection that contains the rows.
However, it is better from a design standpoint to load the existing XML into a dataset, then merge the rows into the dataset and re-serialize the whole thing. By doing it this way, you can be certain that no constraints are being violated and that the resulting xml file can be re-loaded into a dataset.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only