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

`addAttribute` overloads

== Synopses

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

Add an attribute with the specified `name` and `value` to the current element&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class NAME&lowbar;TYPE,
    class VALUE&lowbar;TYPE&gt;
void
xref:BloombergLP/balxml/Encoder_Context/addAttribute-08.adoc[addAttribute](
    NAME&lowbar;TYPE const& name,
    VALUE&lowbar;TYPE const& value);
----

[.small]#xref:BloombergLP/balxml/Encoder_Context/addAttribute-08.adoc[_» more&period;&period;&period;_]#

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class NAME&lowbar;TYPE,
    class VALUE&lowbar;TYPE&gt;
void
xref:BloombergLP/balxml/Encoder_Context/addAttribute-06.adoc[addAttribute](
    NAME&lowbar;TYPE const& name,
    VALUE&lowbar;TYPE const& value,
    int formattingMode);
----

[.small]#xref:BloombergLP/balxml/Encoder_Context/addAttribute-06.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *name*
| attribute name
| *value*
| attribute value
| *formattingMode*
| formatting mode for the value
|===


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