[#BloombergLP-balxml-Formatter_PrettyImplUtil-closeElement] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/Formatter_PrettyImplUtil.adoc[Formatter_PrettyImplUtil]::closeElement :relfileprefix: ../../../ :mrdocs: Decrement the indent level and add the closing tag for the element of the specified `name` to the specified `stream`, with formatting depending on the specified `state`, and update `state` accordingly. Return the `stream`. If the element does not have content, write `/>` and a newline into stream. Otherwise, write `</name>` and a newline. If this `</name>` does not share the same line with data, or it follows another element's closing tag, indent properly before writing `</name>` and the newline. If `name` is root element, flush the output stream. The behavior is undefined if `name` is not the most recently opened element that's yet to be closed. == Synopsis Declared in `<balxml_formatter_prettyimpl.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static std::ostream& closeElement( std::ostream& stream, xref:BloombergLP/balxml/Formatter_PrettyImplUtil/State.adoc[State]* state, std::string_view const& name); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#