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

Open an element of the specified `name` at current indent level with the optionally specified whitespace constraint `whitespaceMode` for its textual data and increment indent level&period; `whitespaceMode` constrains how textual data is written with `addListData` for the current element, but not its nested elements&period; The behavior is undefined if `openElement` is called after the root element is closed and there is no subsequent call to `reset`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
openElement(
    std::string&lowbar;view const& name,
    xref:BloombergLP/balxml/Formatter/WhitespaceType.adoc[WhitespaceType] whitespaceMode = e&lowbar;PRESERVE&lowbar;WHITESPACE);
----


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