Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Append to an XML file
Message
 
À
01/12/2005 13:44:14
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
XML
Divers
Thread ID:
01073740
Message ID:
01073874
Vues:
14
>>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.

I'll have to look into that some more.

>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.

Yeah that is what I feared was the best thing to do. The problem is that I've got some insanely large XML "tables". One of the tables in the XML file has a row size of 42,000 bytes, so with only 100 records that is over 4Mb just for that one table. I am just affreaid that a customer will try to run the app on a lowerend PC (regardless of what the system requirements will say). Too much frikkin data!! :)

Thanks for your reply.

Einar
Semper ubi sub ubi.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform