Add an XML header with optionally specified encoding.
Declared in <balxml_formatter_compactimpl.h>
static
std::ostream&
addHeader(
std::ostream& stream,
State* state,
std::string_view const& encoding);
Write the header 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.
a reference to the modifiable stream
| Name | Description |
|---|---|
| stream | output stream |
| state | formatter state to consult and update |
| encoding | character encoding for the XML declaration |