BloombergLP::balxml::Formatter::addListData

Add the specified value as the data content, where value can be of the following types: char, short, int, bsls::Types::Int64, float, double, bsl::string, bdlt::Datetime, bdlt::Date, and bdlt::Time. Prefix the value with a space(0x20) unless the data being added is the first data on a line. When adding the data makes the line too long, perform line-wrapping and indentation as determined by the whitespace constraint used when the current element is opened with openElement. If value is of type bsl::string or convertible to bsl::string_view, the presence of invalid input stops the transfer of data to the output specified on construction (see {Valid Strings}). If value is of type bsl::string or convertible to bsl::string_view, any special characters in value are escaped (see {Special Characters}). If value is of type char, it is cast to a signed byte value with a range of [ -128 .. 127 ]. Optionally specify the formattingMode to specify the format used to encode value. The behavior is undefined if the call is made when there are no opened elements.

Synopsis

Declared in <balxml_formatter.h>

template<class TYPE>
void
addListData(
    TYPE const& value,
    int formattingMode = 0);