[#BloombergLP-balxml-Encoder-encode-00]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/Encoder.adoc[Encoder]::encode
:relfileprefix: ../../../
:mrdocs:

Encode the specified non&hyphen;modifiable `object` to the specified `formatter`&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; Note that encoder will use encoder options, error and warning streams specified at the construction time&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
int
encode(
    xref:BloombergLP/balxml/Formatter.adoc[Formatter]& formatter,
    TYPE const& object);
----


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