[#BloombergLP-balxml-MiniReader-open-04]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/MiniReader.adoc[MiniReader]::open
:relfileprefix: ../../../
:mrdocs:

`open` overloads

== Synopses

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

Set up the reader for parsing the XML file named by `filename`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
int
xref:BloombergLP/balxml/MiniReader/open-02d.adoc[open](
    char const* filename,
    char const* encoding = 0) override;
----

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

Set up the reader for parsing the XML data in the specified `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
int
xref:BloombergLP/balxml/MiniReader/open-02f.adoc[open](
    std::streambuf* stream,
    char const* url = 0,
    char const* encoding = 0) override;
----

[.small]#xref:BloombergLP/balxml/MiniReader/open-02f.adoc[_» more&period;&period;&period;_]#

Set up the reader for parsing the XML data in the specified `buffer`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
int
xref:BloombergLP/balxml/MiniReader/open-09.adoc[open](
    char const* buffer,
    std::size&lowbar;t size,
    char const* url = 0,
    char const* encoding = 0) override;
----

[.small]#xref:BloombergLP/balxml/MiniReader/open-09.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 parse
| *encoding*
| optional document encoding override
| *stream*
| stream buffer containing the XML document
| *url*
| optional base URL for the document
| *buffer*
| memory containing the XML document
| *size*
| number of bytes in `buffer`
|===


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