This documentation is archived and is not being maintained.

XmlWriter.WriteEndElement Method

When overridden in a derived class, closes one element and pops the corresponding namespace scope.

[Visual Basic]
Public MustOverride Sub WriteEndElement()
public abstract void WriteEndElement();
public: virtual void WriteEndElement() = 0;
public abstract function WriteEndElement();


Exception Type Condition
InvalidOperationException This results in an invalid XML document.


If the element contains no content, a short end tag "/>" is written; otherwise, a full end tag is written.


See WriteEndElement (in the XmlTextWriter class) for an example using this method.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

XmlWriter Class | XmlWriter Members | System.Xml Namespace