Understanding XML

  • Thread starter Thread starter raffelm
  • Start date Start date
R

raffelm

I want to be able to use XML as my "database" for my app. I have made
some classes and added the appropriate XML tags in them. eg:
public class Account
{
[XmlElement(DataType = "AccountName")]
public string m_sName;
};

Now, what is the best method for reading and writing the XML? I
thought about using XmlSerializer but searches in google indicated
that XmlSerializer doesn't work with arrays very well. What other
options do I have?

Thanks
Matt
 
One easy option you have is to use a DataSet, and the DataSet's ReadXml and
WriteXml methods.
In this manner, you could keep your DataSet in an Xml file and use the more
user-friendly relational methods the DataSet and DataTable offer.

Peter
 
Back
Top