[#BloombergLP-balxml-Formatter-addElementAndData] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/Formatter.adoc[Formatter]::addElementAndData :relfileprefix: ../../../ :mrdocs: Add element of the specified `name` and the specified `value` as the data content. This has the same effect as calling the following sequence: `openElement(name); addData(value), closeElement(name);`. Optionally specify the `formattingMode`. == Synopsis Declared in `<balxml_formatter.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> void addElementAndData( std::string_view const& name, TYPE const& value, int formattingMode = 0); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#