OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



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

[ Lists Home | Date Index | Thread Index ]

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.


> 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.



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


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS