Subject: [mmox] Better XML maps

From: Catherine Pfeffer <[email-masked]>
Date: Thu, 26 Feb 2009 11:57:24 +0100

Hi Meadhbh,

 I know this contradicts what I just said on the list, but I am trying to be
very honest intellectually, so here is a technical trick to make XML maps a
less "terrible serialization":

Replace

 <map>

...

<key>Taper_X</key>

<float>0.5</float>

...

</map>

with

 <map>

...

<entry key="Taper_X">

<float>0.5</float>

</entry>

...

</map>

That's 20 characters versus 11, but so much more DOM and XPath friendly.

Corresponding XPath expression is

map/entry[@key = 'Taper_X']/float

 You can go down to 12 bytes if you use <e> instead of <entry>.

(but believe me, drop XML and JSON serializations... simple is beautiful)

-- 
Cathy