|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] [newbie] Mapping a Map 101?
Hello,
Not quiet sure if this is the right forum for such a basic question,
but here you go...
I would like to map a, er, map (as in java.util.Map) into a XML
element... but I'm not quiet sure how "verbose" I should be...
For example:
<map>
<entry>
<key>
<string>aKey</string>
</key>
<value>
<integer>101</integer>
</value>
</entry>
</map>
The above pretty much "spell out" everything: a map is composed of
entries containing key value pairs.
This is pretty much how XML-RPC defines a structure:
http://www.xmlrpc.com/spec
Alternatively, XStream encodes a Map pretty much like the above, but
drops the inner <key/> and <value/> while still specifying an <entry/>
tag:
http://xstream.codehaus.org/converters.html
Finally, Apple uses only one <key/> element in their property lists:
http://developer.apple.com/documentation/Cocoa/Conceptual/
PropertyLists/index.html
In theory a map element could get going by simply defining it as a
succession of values:
<map>
<string>aKey</string>
<integer>101</integer>
</map>
Is there a more or less "agreed upon" scheme to define a map type
structure in XML?
Thoughts? Alternatives?
TIA.
PA.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








