[#BloombergLP-balxml-Formatter-closeElement]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/Formatter.adoc[Formatter]::closeElement
:relfileprefix: ../../../
:mrdocs:

Decrement the indent level and add the closing tag for the element of the specified `name`&period; If the element does not have content, write `&sol;&gt;` and a newline into stream&period; Otherwise, write `&lt;&sol;name&gt;` and a newline&period; If this `&lt;&sol;name&gt;` does not share the same line with data, or it follows another element&apos;s closing tag, indent properly before writing `&lt;&sol;name&gt;` and the newline&period; If `name` is root element, flush the output stream&period; The behavior is undefined if `name` is not the most recently opened element that&apos;s yet to be closed&period;

== Synopsis

Declared in `&lt;balxml&lowbar;formatter&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
closeElement(std::string&lowbar;view const& name);
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
