Closes the writer.
This method closes all elements and attributes created by the XmlTextWriter.WriteStartElement(string, string, string) and XmlTextWriter.WriteStartAttribute(string, string, string) methods, respectively, that are open when the XmlTextWriter.Close method is called.
This method calls the XmlTextWriter.Flush method to flush the underlying buffered stream and then closes the stream.
This method sets the XmlTextWriter.WriteState to WriteState.Closed.
Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0