[#BloombergLP-balxml-Formatter-2constructor-01] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/Formatter.adoc[Formatter]::Formatter :relfileprefix: ../../../ :mrdocs: Construct a formatter that writes XML to the specified `output` streambuf. == Synopsis Declared in `<balxml_formatter.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- Formatter( std::streambuf* output, int indentLevel = 0, int spacesPerLevel = 4, int wrapColumn = 80, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- == Description Optionally specify initial `indentLevel`, `spacesPerLevel`, and `wrapColumn` for formatting. An `indentLevel` of 0 (the default) indicates the root element will have no indentation. A `wrapColumn` of 0 will cause the formatter to behave as though the line length were infinite, but will still insert newlines and indent when starting a new element. A `wrapColumn` of ‐1 will cause output to be formatted in "compact" mode ‐‐ with no added newlines or indentation. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. The behavior is undefined if the `output` streambuf is destroyed before this object. == Parameters [cols="1,4"] |=== | Name| Description | *output* | streambuf to which XML is written | *indentLevel* | initial indentation level | *spacesPerLevel* | spaces per indentation level | *wrapColumn* | column at which to wrap lines, or special value | *basicAllocator* | memory allocator; null uses the default |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#