VB.NET
Dim xmlText As String = 'Node1 Node2 '
Dim xmlDoc As New XmlDocument
xmlDoc.LoadXml(xmlText)
Dim writer As XmlTextWriter = New XmlTextWriter(Server.MapPath('data.xml'), Nothing)
writer.Formatting = Formatting.Indented
xmlDoc.Save(writer)
C#
string xmlText = 'Node1 Node2 ';
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(xmlText);
XmlTextWriter writer = new XmlTextWriter(Server.MapPath('data.xml'),null);
writer.Formatting = Formatting.Indented;
xmlDoc.Save(writer);
Share with