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
493 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

828 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