[#BloombergLP-balxml-Encoder_Context-addAttribute-06]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/Encoder_Context.adoc[Encoder&lowbar;Context]::addAttribute
:relfileprefix: ../../../
:mrdocs:

Add an attribute with the specified `name` and `value`, using the specified `formattingMode`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class NAME&lowbar;TYPE,
    class VALUE&lowbar;TYPE&gt;
void
addAttribute(
    NAME&lowbar;TYPE const& name,
    VALUE&lowbar;TYPE const& value,
    int formattingMode);
----


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