How to store and get values form xml file using C# asp.net ?

Posted by Mahe under C# on 3/30/2012 | Points: 10 | Views : 12448 | Status : [Member] | Replies : 7
Hi All,

How to store and get values form xml file using C# asp.net ?
I dont want to hard code in .cs file nor i want to store in config file, so i want to add data in xml file and retrieve it.
So please provide me any link or code for it.

Thanks&Regards,
Mahendra




Responses

Posted by: Rajni.Shekhar on: 3/30/2012 [Member] Bronze | Points: 25
Posted by: Jeyaganeshmuniyandi on: 3/31/2012 [Member] Starter | Points: 25

Up
0
Down

please follow this link
---------------------------
http://www.dotnetfunda.com/blogs/jeyaganeshmuniyandi/2159/how-to-insert-data-into-xml-and-how-to-retrieve-data-from-xml-or-how-to-bind-da

Thanks,
M.Jeya ganesh

Mahe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hmanjarawala on: 3/31/2012 [Member] Bronze | Points: 25

Up
0
Down
hey, follow this url
http://www.c-sharpcorner.com/UploadFile/mahesh/ReadWriteXMLTutMellli2111282005041517AM/ReadWriteXMLTutMellli21.aspx

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Mahe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Veerac85 on: 4/5/2012 [Member] Starter | Points: 25

Up
0
Down
You could use XMLDocument or XMLTextReader to get the data from the XML file. If you are not worried about validating it against XSD, I would recommend XMLTextReader. It is way too efficient.

You could to go to http://technico.qnownow.com/2012/04/05/parse-read-xml-using-xml-reader-in-c/ for the complete code.

Regards
Veera

Mahe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 4/6/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

you can use XmlReader, XmlTextReader and XmlDocument

see this link

http://stackoverflow.com/questions/1542326/how-to-read-data-from-xml-file

R D Patel

Mahe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 4/6/2012 [Member] Starter | Points: 25

Up
0
Down

Posted by: Patel28rajendra on: 4/6/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

Please Mark as Answer if it Helps

R D Patel

Mahe, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response