Coding for Manipulate XML File Data Using C#?



Coding for Manipulate XML File Data Using C#?..

Answer / mahmoud kotb

XmlDocument doc = new XmlDocument();
doc.Load((@"c:/newfile.xml");
XmlNode xnode = doc.SelectSingleNode("//Settings/Bar");
//read the value of “Dheeraj”)
String Str = xnode.Innerxml;
//TO Update the value of “Dheeraj” to “Kumar”
Xnode.innerxml = “kumar”;
//TO delete the value of “Dheeraj” (all nodes of add tag)
Xnode.removeall();
doc.save((@"c:/newfile.xml");

Is This Answer Correct ?    3 Yes 3 No

Post New Answer

More C Sharp Code Interview Questions

Can you declare an array of mixed Types?

1 Answers   HCL,


Code for Reading and writing from a file?

0 Answers   IBM, Xoriant,


how to get the table names via c sharp and column names also?

2 Answers   Sify,


c# code to Count number of 1's in a given range of integer (0 to n)

0 Answers  


Code for IP Address Comparison and Conversion in C#?

0 Answers  


Code for Searching for Multiple Matches with the MatchCollection Class?

0 Answers   TCS,


how do i copy textbox contents of 1 form to another form

4 Answers   Wipro,


program for string reverse(eg:- i am boy -> boy am i)

8 Answers   Black Pepper, Infosys, Mind Tree,


how does the below eqation proceed to be solved: x*=y+z options: x=x*y+z or x=x*(y+z)

1 Answers  


program to check if a number is "perfect number".

1 Answers   Mind Tree, SoftSol,


how to change password in .net with c # with ado.net and also SQL server 2008 change password

1 Answers  


How to use ASP.NET 2.0's TreeView to Display Hierarchical Data?

1 Answers  


Categories
  • ASP.NET Code Interview Questions ASP.NET Code (46)
  • VB.NET Code Interview Questions VB.NET Code (9)
  • C Sharp Code Interview Questions C Sharp Code (51)
  • ADO.NET Code Interview Questions ADO.NET Code (8)