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

`open` overloads

== Synopses

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

Open the reader to decode XML from the file with the specified `filename`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/balxml/Decoder/open-0e.adoc[open](char const* filename);
----

[.small]#xref:BloombergLP/balxml/Decoder/open-0e.adoc[_» more&period;&period;&period;_]#

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/balxml/Decoder/open-05.adoc[open](
    std::istream& stream,
    char const* uri = 0);
----

[.small]#xref:BloombergLP/balxml/Decoder/open-05.adoc[_» more&period;&period;&period;_]#

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/balxml/Decoder/open-0d.adoc[open](
    std::streambuf* buffer,
    char const* uri = 0);
----

[.small]#xref:BloombergLP/balxml/Decoder/open-0d.adoc[_» more&period;&period;&period;_]#

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/balxml/Decoder/open-06.adoc[open](
    char const* buffer,
    std::size&lowbar;t length,
    char const* uri = 0);
----

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

== Return Value

0 on success and non&hyphen;zero otherwise

== Parameters

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


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