BloombergLP::balxml::Formatter_PrettyImplUtil

This utility struct provides a namespace for pretty-printing XML.

Synopsis

Declared in <balxml_formatter_prettyimpl.h>

struct Formatter_PrettyImplUtil;

Description

It provides a suite of operations used to pretty-print XML documents given a sequence of tokens to emit. Together with Formatter_PrettyImplState, this struct provides an implementation of a state machine for such pretty-printing.

Type Aliases

NameDescription
State State type used by pretty-formatter utilities.
StateId State-id type used by pretty-formatter utilities.
WhitespaceType Alias for FormatterWhitespaceType.

Static Member Functions

NameDescription
addAttribute Add an attribute of the specified name and value to the currently open element.
addBlankLine Insert one or two newlines so that a blank line results.
addComment Write the specified comment into the specified stream.
addData Add the specified value as data content to the specified stream.
addElementAndData Add an element of the specified name with the specified value as its data content.
addHeader Add an XML declaration header with the optionally specified encoding.
addListData Add the specified value as list-item data content to the specified stream.
addNewline Insert a literal newline into the XML output.
addValidComment Write the specified comment into the specified stream.
closeElement Close the most recently opened element of the specified name.
flush Insert the closing > if there is an incomplete tag, and flush the output stream.
openElement Open an element of the specified name.
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.