|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: [newbie] Mapping a Map 101?
> -----Original Message----- > From: PA [mailto:petite.abeille@g...] > Sent: Monday, December 13, 2004 11:54 AM > To: xml-dev@l... > Subject: Re: [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> > >
|
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








