>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.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement