[Home] [By Thread] [By Date] [Recent Entries]

  • To: xml-dev@l...
  • Subject: Re: [newbie] Mapping a Map 101?
  • From: PA <petite.abeille@g...>
  • Date: Mon, 13 Dec 2004 18:58:51 +0100
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:return-path:mime-version:in-reply-to:references:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer; b=UVu0Y4B6ZWvGZ4yaoqLNnVhbdzJZZmyFd/XM449HNpvOBJb5db81/rVeC1dfMAQ9beLsntUNDh/w53+arcww2Rbz90aezJnbRyg6pg2JILh4x0yClw86SyG+NuCNHiTKYxJ5V7Sdk9ZNQbmtO1XpYgEm/e3iQ0pT34qGTBc7T/I=
  • In-reply-to: <74B14CBC0FEB9D4EB16969F09FA51F450B113D@M...>
  • References: <74B14CBC0FEB9D4EB16969F09FA51F450B113D@M...>


On Dec 13, 2004, at 18:14, Chiusano Joseph wrote:

> Oh - I should be clearer. With the approach just above (#1 through #6),
> if you wanted to process the XML document to find a particular element
> (or set of elements), you would have to use a positional approach 
> rather
> than an approach based on a specific element name.

Correct.

> If you have optional
> elements whose inclusion in an XML document various instance by
> instance, the positional approach would break.

Correct. This is why such a structure would be restricted to sequential 
key-value pairs.

If you need additional information (for example for a TreeMap [1]), 
this could be perhaps modeled either as a different element or perhaps 
by adding a type attribute to the map element.

Cheers,

PA.

[1] http://java.sun.com/j2se/1.4.2/docs/api/java/util/TreeMap.html


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member