using System;
using System.Collections;
using System.Data;
using System.Xml;
class MainClass{
public static void Main(){
XmlDocument doc = new XmlDocument();
// read
doc.Load( "Sample.xml" );
Console.WriteLine(doc.OuterXml);
// write
XmlTextWriter tw = new XmlTextWriter( "testOut.xml", null );
tw.Formatting = Formatting.Indented;
tw.Indentation = 4;
doc.Save( tw );
tw.Close();
}
}
|