[#BloombergLP-balxml-Encoder-encode-08] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/Encoder.adoc[Encoder]::encode :relfileprefix: ../../../ :mrdocs: Encode the specified non‐modifiable `object` to the specified `buffer`. Return 0 on success, and a non‐zero value otherwise. Note that the encoder will use encoder options, error and warning streams specified at the construction time. == Synopsis Declared in `<balxml_encoder.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> int encode( std::streambuf* buffer, TYPE const& object); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#