By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,458 Members | 1,463 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,458 IT Pros & Developers. It's quick & easy.

Understanding XML

P: n/a
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
Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

"raffelm" <ma*********@mindspring.com> wrote in message
news:ba**************************@posting.google.c om...
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

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.