Parth48
asked on
how can i create xml file in my C#.net win application and then read data from that ??
i want to create xml file in my C#.net window application and store sensitive data into it,
and then read it to get data,
but how can i do this ??
and then read it to get data,
but how can i do this ??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Where will the infromation in xml comes from? if it is in the database then you can use dataset.
Sample code in creating and reading xml file using dataset:
DataSet ds = new DataSet();
// This code creates the XML file.
ds.WriteXml("YourFileNameH ere");
// This code reads the XML file.
ds.ReadXml("YourFileNameHe re");
Sample code in creating and reading xml file using dataset:
DataSet ds = new DataSet();
// This code creates the XML file.
ds.WriteXml("YourFileNameH
// This code reads the XML file.
ds.ReadXml("YourFileNameHe
Better to use config file for your purpose. Here is the sample:
http://www.codeproject.com/KB/cs/customconfig.aspx
http://www.codeproject.com/KB/cs/customconfig.aspx
http://www.dotnetspider.com/forum/182793-write-xml-c-windows-application.aspx