How to using XML as a simple table storage?

  • Thread starter Thread starter Cylix
  • Start date Start date
C

Cylix

Which object should be using for this purpose?
I just need to using the xml file for read and insert, is it good to
using XmlTextWriter to do so?

Thanks.
 
Cylix said:
Which object should be using for this purpose?
I just need to using the xml file for read and insert, is it good to
using XmlTextWriter to do so?

There are different ways, you can read in the document with
System.Xml.XmlDocument, manipulate that object model in memory and save
it back.
Or you can use XML serialization/deserialization to map your XML to .NET
objects, that way you deserialize your XML to .NET objects with
properties that you can manipulate, then to store you serialize your
objects back to XML.
Or you can read your XML into a DataSet and manipulate that and write
the data set back to XML.
 
Back
Top