[#BloombergLP-balxml-Formatter_CompactImplUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::Formatter_CompactImplUtil :relfileprefix: ../../ :mrdocs: Utility operations for compact (minimal‐whitespace) XML formatting. == Synopsis Declared in `<balxml_formatter_compactimpl.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct Formatter_CompactImplUtil; ---- == Description This utility `struct` provides a namespace for a suite of operations used to pretty‐print XML documents given a sequence of tokens to emit. Together with `Formatter_CompactImplState`, this `struct` provides an implementation of a state machine for such pretty‐printing. == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balxml/Formatter_CompactImplUtil/State.adoc[`State`] | State type used by compact‐formatter utilities. | xref:BloombergLP/balxml/Formatter_CompactImplUtil/StateId.adoc[`StateId`] | State‐id type used by compact‐formatter utilities. | xref:BloombergLP/balxml/Formatter_CompactImplUtil/WhitespaceType.adoc[`WhitespaceType`] | Alias for `FormatterWhitespaceType`. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balxml/Formatter_CompactImplUtil/addAttribute.adoc[`addAttribute`] | Add an attribute of the specified `name` and `value` to the open element in the specified `stream`. | xref:BloombergLP/balxml/Formatter_CompactImplUtil/addBlankLine.adoc[`addBlankLine`] | Insert one or two newlines so that a blank line results. | xref:BloombergLP/balxml/Formatter_CompactImplUtil/addComment.adoc[`addComment`] | Write the specified `comment` into the specified `stream`. | xref:BloombergLP/balxml/Formatter_CompactImplUtil/addData.adoc[`addData`] | Add the specified `value` as the data content to the specified `stream`. | xref:BloombergLP/balxml/Formatter_CompactImplUtil/addElementAndData.adoc[`addElementAndData`] | Add an element of the specified `name` with the specified `value` as its data content to the specified `stream`. | xref:BloombergLP/balxml/Formatter_CompactImplUtil/addHeader.adoc[`addHeader`] | Add an XML header with optionally specified `encoding`. | xref:BloombergLP/balxml/Formatter_CompactImplUtil/addListData.adoc[`addListData`] | Add the specified `value` as list data content to the specified `stream`. | xref:BloombergLP/balxml/Formatter_CompactImplUtil/addNewline.adoc[`addNewline`] | Insert a literal newline into the XML output. | xref:BloombergLP/balxml/Formatter_CompactImplUtil/addValidComment.adoc[`addValidComment`] | Write a valid XML comment into the specified `stream`. | xref:BloombergLP/balxml/Formatter_CompactImplUtil/closeElement.adoc[`closeElement`] | Close the most recently opened element of the specified `name`. | xref:BloombergLP/balxml/Formatter_CompactImplUtil/flush.adoc[`flush`] | Flush the output stream, completing any open start tag first. | xref:BloombergLP/balxml/Formatter_CompactImplUtil/openElement.adoc[`openElement`] | Open an element of the specified `name`. | xref:BloombergLP/balxml/Formatter_CompactImplUtil/reset.adoc[`reset`] | Reset the specified formatter `state` such that it can be used to format a new XML document as if the formatter were just constructed. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#