Here are my notes on writing floating-point binary data as decimal strings, including within XML nodes. My concern is with IEEE 754-2008 Floating-Point binary values, and really only with the single- (C/C++ float) and double-precision (C/C++ double) forms, not the extended forms.
Avoiding Round-Off Errors in the Round Trip