Solved

how can i create xml file in my C#.net win application and then read data from that ??

Posted on 2011-02-10
4
490 Views
Last Modified: 2012-05-11
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 ??
0
Comment
Question by:Parth48
  • 2
4 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 34868645
Reading and Writing XML in C#
http://www.c-sharpcorner.com/uploadfile/mahesh/readwritexmltutmellli2111282005041517am/readwritexmltutmellli21.aspx

To make sure that you're sensitive data is protected, apply some kind of encryption

How to: Encrypt XML Elements with Asymmetric Keys
http://msdn.microsoft.com/en-us/library/ms229746.aspx

0
 
LVL 6

Expert Comment

by:kswathi
ID: 34868646
0
 
LVL 8

Expert Comment

by:PagodNaUtak
ID: 34868691
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("YourFileNameHere");

// This code reads the XML file.
ds.ReadXml("YourFileNameHere");
0
 
LVL 8

Expert Comment

by:PagodNaUtak
ID: 34868695
Better to use config file for your purpose. Here is the sample:

 http://www.codeproject.com/KB/cs/customconfig.aspx
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now