Closes one element and pops the corresponding namespace scope.
using System;
using System.IO;
using System.Xml;
public class Sample {
public static void Main() {
XmlWriterSettings settings = new XmlWriterSettings();
settings.Indent = true;
XmlWriter writer = XmlWriter.Create(Console.Out, settings);
writer.WriteStartElement("order");
writer.WriteStartElement("item");
writer.WriteAttributeString("date", "2/19/01");
writer.WriteAttributeString("orderID", "A1");
writer.WriteFullEndElement();
writer.WriteEndElement();
writer.Close();
}
}
Related examples in the same category