// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Text; using System.Xml; namespace E { public class Program { public static void Main(string[] args) { XmlTextWriter xtw = new XmlTextWriter(@"C:\empty.xml", Encoding.UTF8); xtw.Formatting = Formatting.Indented; xtw.WriteStartDocument(); xtw.WriteStartElement("ArrayOfXmlProfile"); xtw.WriteAttributeString("xmlns", "xsi", null, "http://www.w3.org/2001/XMLSchema-instance"); xtw.WriteAttributeString("xmlns", "xsd", null, "http://www.w3.org/2001/XMLSchema"); xtw.WriteEndElement(); xtw.WriteEndDocument(); xtw.Close(); } } }