[#BloombergLP-balxml-Formatter_PrettyImplUtil-addHeader] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/Formatter_PrettyImplUtil.adoc[Formatter_PrettyImplUtil]::addHeader :relfileprefix: ../../../ :mrdocs: Add an XML declaration header with the optionally specified `encoding`. == Synopsis Declared in `<balxml_formatter_prettyimpl.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static std::ostream& addHeader( std::ostream& stream, xref:BloombergLP/balxml/Formatter_PrettyImplUtil/State.adoc[State]* state, std::string_view const& encoding); ---- == Description Write to the specified `stream`, with formatting depending on the specified `state`, and update `state` accordingly. Return the `stream`. Version is always "1.0". The behavior is undefined unless `addHeader` is the first manipulator (with the exception of `rawOutputStream`) after construction or `reset`. == Return Value a reference to the modifiable `stream` == Parameters [cols="1,4"] |=== | Name| Description | *stream* | output stream to write to | *state* | formatter state to update | *encoding* | character encoding named in the XML declaration |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#