using System;
using System.IO;
using System.Xml;
public class Sample
{
public static void Main()
{
XmlTextWriter writer = new XmlTextWriter (Console.Out);
writer.Formatting = Formatting.Indented;
writer.WriteStartElement("book");
writer.WriteElementString("title", "C#");
writer.WriteEndElement();
writer.Flush();
writer.WriteStartElement("cd");
writer.WriteElementString("title", "Americana");
writer.WriteEndElement();
writer.Flush();
writer.Close();
}
}