Boost logo

Boost Users :

Subject: Re: [Boost-users] [Serialization] XML: float format is scientific instead of human-readable since Boost 1.57
From: Clark Cianfarini (ccianfarini_at_[hidden])
Date: 2015-01-30 09:45:21


On Fri, Jan 30, 2015 at 4:04 AM, Frank Stähr <staehr_at_[hidden]>
wrote:

> Here a reminder to my most important question:
>
> On 28.01.2015 at 18:07, Frank Stähr wrote:
>
>> Not really, this just makes it harder to read or edit XMLs now.
>> Is it possible for us to write the “old” XML format?
>>
>
> So I guess no?
>
>
The way our company chose to create human-readable XML is to serialize
strings instead of doubles or floats. We used a stringstream with
std::setprecision to get a certain number of decimal places. The number
has a chance of being slightly different after de-serialization and pulling
it out of the stringstream, just like the old serialization method. This
is okay for us, as we need human-readable XML more than exact round
tripping.

Hope this helps.

_______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net