|
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
support.)
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"> <r> <f>test</f> <f>1</f> </r> <r> <f>test2</f> <f>2</f> </r> </q> or <q size="2" name="v"> <r name="[0]"> <f name="first">test</f> <f name="second">1</f> </r> <r name="[1]"> <f name="first">test2</f> <f name="second">2</f> </r> </q>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk