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 ]

> -----Original Message-----
> From: PA [mailto:petite.abeille@gmail.com] 
> Sent: Monday, December 13, 2004 11:54 AM
> To: xml-dev@lists.xml.org
> Subject: Re: [xml-dev] [newbie] Mapping a Map 101?
> 
> 
> On Dec 13, 2004, at 17:45, Chiusano Joseph wrote:
> 
> >> <value type="int">10</value>
> >>
> >> versus
> >>
> >> <int>10</int>
> >
> > With the second approach, how would you distinguish between 
> specific 
> > elements?
> 
> Hmmm... not sure if I understand the question... a 
> "minimalistic" map could be defined as an ordered sequence of 
> elements ... so the first element is a key, the second one a 
> value, and so on... for example:
> 
> 1: <map>
> 2:	<string>aKey</string>
> 3:	<string>aValue</string>
> 4:	<string>anotherKey</string>
> 5:	<string>anotherValue</string>
> 6: </map>
> 
> When resolving such a structure, line 2 and 4 would be 
> considered as keys and line 3 and 5 as values.
> 
> Was that the question?

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.

Hope that helps.

Kind Regards,
Joseph Chiusano
Booz Allen Hamilton
Strategy and Technology Consultants to the World
  
> Cheers,
> 
> PA.
> 
> 
> 
> 
> 
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org 
> <http://www.xml.org>, an initiative of OASIS 
> <http://www.oasis-open.org>
> 
> The list archives are at http://lists.xml.org/archives/xml-dev/
> 
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>
> 
> 




 

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

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