Member Avatar for hardikpatel

i want to create the xml file and add insert and delete the node
, caN YOU SUGGES ME TO THE CODE OR LINK TO HELP ME ,

Member Avatar for kvprajapati

i want to create the xml file and add insert and delete the node
, caN YOU SUGGES ME TO THE CODE OR LINK TO HELP ME ,

DataSet class and classes from namespace, System.Xml - Dom classes are two handy ways to manipulate xml document.

Member Avatar for hardikpatel

DataSet class and classes from namespace, System.Xml - Dom classes are two handy ways to manipulate xml document.

can u sugges me the link fromm i got some code idea

Member Avatar for kvprajapati

hardikpatel>can u sugges me the link fromm i got some code idea.

Read MSDN pages - or - Reference Books.

Member Avatar for angadsk

xml File
/*

<?xml version="1.0" standalone="yes"?> <StudentRecords> <Student> <Id>44</Id> <Name>Angad</Name> <Age>23</Age> <Class>Engineer</Class> </Student> <Student> <Id>12</Id> <Name>Angad Singh Khurana</Name> <Age>28</Age> <Class>Engineer</Class> </Student> </StudentRecords>

*/

DataSet dt = new DataSet(); dt.ReadXml(Directory.GetCurrentDirectory().ToString() + "/StudentDetails.xml"); string tagValue = "44"; DataRow[] dr = dt.Tables[0].Select("Id=" + tagValue); if (dr.Length != 0) { dr[0]["Name"] = "Suresh"; dr[0]["Age"] = "10"; dr[0]["Class"] = "5th"; dt.Tables[0].AcceptChanges(); dt.WriteXml(Directory.GetCurrentDirectory().ToString() + "/StudentDetails.xml"); }

http://support.microsoft.com/kb/317665

hardikpatel>can u sugges me the link fromm i got some code idea.

Read MSDN pages - or - Reference Books.

Member Avatar for kvprajapati

angadsk,
Use code tags to post source code. Source code must be surrounded with bb code tags.
For example,

[code=asp.net] .... statements...

[/code]

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.