Write XML document to console
using System;
using System.Xml;
public class HelloXML {
public static void Main(string [] args) {
XmlTextWriter writer = new XmlTextWriter(Console.Out);
writer.WriteStartDocument( );
writer.WriteElementString("www.java2s.com", "XML");
writer.WriteEndDocument( );
writer.Close( );
}
}
Related examples in the same category