Type Reason InvalidOperationException No element was open, or the XmlWriter.WriteState is WriteState.Closed.
This method always writes the full end tag. This is useful when dealing with elements that must include a full end tag. For example, browsers expect HTML script blocks to be closed with "</script>".
For the asynchronous version of this method, see XmlWriter.WriteFullEndElementAsync.