Mono Class Library: System.Xml.XmlWriter Overview | Members

System.Xml.XmlWriter.WriteEndDocument Method

Closes open elements and attributes and sets the XmlWriter.WriteState back to the WriteState.Start state. [Edit]

public abstract void WriteEndDocument ()

Exceptions

TypeReason
ArgumentExceptionThe current instance is in the wrong System.Xml.WriteState, or the document does not have a root element. [Edit]

Remarks

Operation
This method closes all elements and attributes created by the XmlWriter.WriteStartElement(string, string) and XmlWriter.WriteStartAttribute(string, string) methods, respectively, that are open when the XmlWriter.WriteEndDocument method is called.

Note to Inheritors
This method must be overridden in order to provide the functionality as described herein, as there is no default implementation.

Usage
After calling this method, the current instance can be used to write a new XML document.

[Edit]

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0