[#BloombergLP-balxml-Decoder-open-06]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/Decoder.adoc[Decoder]::open
:relfileprefix: ../../../
:mrdocs:

Open the reader to decode XML from the specified memory `buffer`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
open(
    char const* buffer,
    std::size&lowbar;t length,
    char const* uri = 0);
----

== Description

Open the associated `Reader` object (see `Reader&colon;&colon;open`) to read XML data from memory at the specified `buffer`, with the specified `length`&period; The (optionally) specified `uri` is used for identifying the input document in error messages&period; Return 0 on success and non&hyphen;zero otherwise&period;

== Return Value

0 on success and non&hyphen;zero otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *buffer*
| buffer providing XML data
| *length*
| number of bytes in `buffer`
| *uri*
| optional URI identifying the input document in error messages
|===


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