Thomas Grill said this at Mon, 1 Dec 2003 13:55:56 +0100:
My primary concern is whether values should rather be given as
<value> <key>0</key> <data>1 2 3 hu ha</data> </value>
rather than currently <value key="0">1 2 3 hu ha</value> Does that matter for automatic processing of XML data or database storage? I have practically no knowledge of XML conversion.
I must say that using the key as an attribute surprised me when I first saw it, but it's not so bad.
I want to be able to filter through these files with XPath, mostly, and after playing with a few of the alternatives on the table, it seems like your original format is the best, if you want to have a uniform structure that conforms to a generic DTD.
Something that would simplify XPath/XSLT processing in certain cases is having a direct output of keys into elements:
<akey> <anotherkey>0</anotherkey> <subdirectory> <bkey>3 5 6</bkey> </subdirectory> </akey>
...but I can see how this would descend into chaos pretty quickly if you wanted to be generic.
So my vote is for your description as shown below.
<pool> <value key="1">60</value> <value key="2">51</value> <dir key="bla"> <value key="2">66</value> <value key="1">44</value> </dir> </pool>