[#BloombergLP-balxml-Encoder-encodeAny-05]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/Encoder.adoc[Encoder]::encodeAny
:relfileprefix: ../../../
:mrdocs:

Encode the specified `object` to the specified `buffer` without instantiating encoding templates at compile time&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
encodeAny(
    std::streambuf* buffer,
    xref:BloombergLP/bdlar/AnyConstRef.adoc[bdlar::AnyConstRef] const& object);
----

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *buffer*
| output stream buffer to receive XML
| *object*
| type&hyphen;erased value to encode
|===


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