Re: [xml-dev] [newbie] Mapping a Map 101?

From
PA <>
To
Date
2004-12-10T23:27:47Z
ID
<>
Thread
Re: [xml-dev] [newbie] Mapping a Map 101?
On Dec 11, 2004, at 00:10, Michael Kay wrote:

>> Is there a more or less "agreed upon" scheme to define a map type
>> structure in XML?
>
> No.

Bummer :/

I would have thought that such a structure would have been pretty 
common by now, no?

> I tend to use <entry key="key">value</entry> probably because it uses 
> only
> two names and I have trouble thinking of names.

I see.

In my case, keys can be of any type, so I'm not quite sure if using an 
element attribute would work...

How would I express the following if using element attributes?

<map>
     <entry>
	    <key>
		    <collection>
			    <string>Compound</string>
			    <string>Key</string>
		    </collection>
	    </key>
	    <value>
		    <integer>101</integer>
	    </value>
     </entry>
</map>

Thanks!

Cheers,

PA.