[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

[newbie] Mapping a Map 101?

  • To: xml-dev@l...
  • Subject: [newbie] Mapping a Map 101?
  • From: PA <petite.abeille@g...>
  • Date: Fri, 10 Dec 2004 23:04:03 +0100
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:return-path:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=D8hZCXAL/PkWx+8E/emFJK36G4sOyWoeCDGPVcgQnOJODP5FQPOxkDT3OHkjGbwdS2mLLfCfSXlRSggmRGFMyz7mL+uu9PZktH61zUZs4YiZYhdSnM/wL+IOuB+RezcHku9m+7TEusXOGofWfhRxcSBbKdv4hCdFhLSxRkCs43s=

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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.