[#BloombergLP-balxml-Formatter_CompactImplUtil-addHeader]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/Formatter_CompactImplUtil.adoc[Formatter&lowbar;CompactImplUtil]::addHeader
:relfileprefix: ../../../
:mrdocs:

Add XML header with optionally specified `encoding` to the specified `stream`, with formatting depending on the specified `state`, and update `state` accordingly&period; Return the `stream`&period; Version is always &quot;1&period;0&quot;&period; The behavior is undefined unless `addHeader` is the first manipulator (with the exception of `rawOutputStream`) after construction or `reset`&period;

== Synopsis

Declared in `&lt;balxml&lowbar;formatter&lowbar;compactimpl&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
std::ostream&
addHeader(
    std::ostream& stream,
    xref:BloombergLP/balxml/Formatter_CompactImplUtil/State.adoc[State]* state,
    std::string&lowbar;view const& encoding);
----


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