[#BloombergLP-balxml-Formatter-addElementAndData] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/Formatter.adoc[Formatter]::addElementAndData :relfileprefix: ../../../ :mrdocs: Add an element of the specified `name` containing the specified `value`. == 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); ---- == Description This has the same effect as calling the following sequence: `openElement(name); addData(value), closeElement(name);`. Optionally specify the `formattingMode`. == Parameters [cols="1,4"] |=== | Name| Description | *name* | name of the element | *value* | data content of the element | *formattingMode* | mode used to format `value` |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#