[#BloombergLP-balxml-Formatter-addData] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/Formatter.adoc[Formatter]::addData :relfileprefix: ../../../ :mrdocs: 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`. Perform no line‐wrapping or indentation as if the whitespace constraint were always `BAEXML_PRESERVE_WHITESPACE` in `openElement`, with the only exception that an initial newline and an initial indent is added when `openElement` specifies `BAEXML_NEWLINE_INDENT` option. 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`, 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>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> void addData( TYPE const& value, int formattingMode = 0); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#