[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Re[2]: XML formats (was: Terse list of valuable projects)

From: Vadim Zeitlin
Subject: [lmi] Re[2]: XML formats (was: Terse list of valuable projects)
Date: Thu, 18 Mar 2010 11:08:06 +0100

On Thu, 18 Mar 2010 01:39:44 +0000 Greg Chicares <address@hidden> wrote:

GC> On a different subject...the "XTbML" format represents vectors thus:
GC>   <Y t="0">0.02182</Y>
GC>   ...
GC>   <Y t="100">1.00000</Y>
GC> OTOH, your 'xml_serialize.hpp' format looks like this:
GC>   <item>0.02182</item>
GC>   <item>1.00000</item>
GC> which seems to be the most usual way of doing it

 Yes, I agree the latter is preferable but OTOH the former is not nearly
bad enough to refuse to use the existing format just because of it.

GC> What I'm wondering is why no one seems to serialize this way instead:
GC>     <item key="propC">
GC>       <data>3 4 5</data>
GC>     </item>

 IMHO this would be a bad idea as the contents of an item should really be
atomic to allow its manipulation with general XML tools and XSLT. Indeed,
pushing this approach to the limit you could transform any binary to "XML"
by representing it as

                ... binary 64 encoded contents ...

It's still XML formally but it's not structured and hence not useful at

 Of course, this is an extreme case and in practice there is a balance to
be found between atomicity and brevity/convenience and I might be too
fanatical about respecting the former. Still, in this case it just seems
wrong to lump the values of all items together like this, I can imagine
situations when you'd want to access individual ones and this wouldn't be
easily possible using e.g. XPath with such format.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]