Code for a Simple Way to Write XML in .NET (XmlTextWriter)



Code for a Simple Way to Write XML in .NET (XmlTextWriter)..

Answer / mohanraja

This coding is to decrement the count value...

Dim writer As New XmlTextWriter("C:\windows\Test.xml", New
System.Text.UTF8Encoding)
writer.WriteStartDocument()
writer.WriteStartElement("Value", "")
writer.WriteStartElement("Countvalue")
writer.WriteStartElement("cntval", "")
writer.WriteString(value - 1)
writer.WriteEndElement()
writer.WriteEndElement()
writer.WriteEndElement()
writer.WriteEndDocument()
writer.Close()

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More ASP.NET Code Interview Questions

How to get the row index on checking a Checkbox in a ListView

1 Answers   TCS,


hold checkbox values

4 Answers  


Coding for Synchronizing Cache Access in ASP.NET?

0 Answers  


How to use Client-side Script to Focus Controls in ASP.NET?

0 Answers  


Data Reader Vs DataSet

5 Answers   TCS,


How we use ajax in asp.net through javaScript. Please givee me an example.

0 Answers  


How to Export Data to Excel?

4 Answers   Eastcom Systems,


how to create a search bar which access data from various websites and retrieves the data

0 Answers  


how to upload a photo? i need to use it in a matrimonial applicaton...

1 Answers  


how can we close a web page in asp.net without using jscript?

4 Answers  


Give coding for Implementing a Fixed GridView Header in ASP.NET?

1 Answers  


How to send e-mail from an ASP.NET application?

16 Answers   DataPoint, Infosys, Persistent, Radar, TCS, Wipro,


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)