SP.XmlWriter.writeEndElement() Method
Applies to: SharePoint Foundation 2010
Appends an end element tag in XML format to the object’s string builder.
SP.XmlWriter.writeEndElement();
Exceptions
Sys.InvalidOperationException
The tag name that was the tagName parameter in the previous call to the SP.XmlWriter.writeStartElement(tagName) Method was null or the previous attribute is not closed.
Remarks
This method appends the end element tag "/>" if the start element tag is not closed; otherwise, it appends a full end element tag "</tagName>" to the string builder.