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()
[C#]
public abstract void WriteEndElement();
[C++]
public: virtual void WriteEndElement() = 0;
[JScript]
public abstract function WriteEndElement();

Exceptions

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

Remarks

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

Example

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

Requirements

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

Show: