Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-11-18 08:05:33

From: "Jeff Garland" <jeff_at_[hidden]>
> Anyway, my conclusion is there is nothing preventing using
> serialization for XML other than the time and energy to do
> it.

As I already said, my experience is that this theory sometimes proves wrong.
I certainly know that I had to redesign my serialization system when I added
XML support (a fixed XML format, defined by me [*], not arbitrary schema

As I already said, binary/sequence formats only need to prepend a header to
the data being serialized, whereas XML and other hierarchical/structured
formats need to append a trailer (or do other processing), too. If the
serialization system hasn't been designed with this in mind, it is possible
that a structured format serializer cannot be written under its framework.

It is also entirely possible that the framework handles structured formats
with ease. The only way to know is to see a proof of concept.

[*] Example:
std::vector< std::pair<std::string, int> > v;
produces either
<q size="2">
<q size="2" name="v">
    <r name="[0]">
        <f name="first">test</f>
        <f name="second">1</f>
    <r name="[1]">
        <f name="first">test2</f>
        <f name="second">2</f>

Boost list run by bdawes at, gregod at, cpdaniel at, john at