|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: [newbie] Mapping a Map 101?
PA wrote:
> Here is the equivalent XML version:
>
> <dict>
> <key>user</key>
> <string>wshakesp</string>
> <key>birth</key>
> <integer>1564</integer>
> <key>death</key>
> <integer>1616</integer>
> </dict>
>
> http://developer.apple.com/documentation/Cocoa/Conceptual/
> PropertyLists/Concepts/XMLPListsConcept.html
>
> How would you make the XML format to represent such a dictionary
> structure less "horrible"?
>
I wouldn't rely on sibling relationships. Instead I'd write:
<dict>
<entry>
<key>user</key>
<string>wshakesp</string>
</entry>
<entry>
<key>birth</key>
<integer>1564</integer>
</entry>
<entry>
<key>death</key>
<integer>1616</integer>
</entry>
</dict>
I might also rethink the notion of embedding the data types in the tag
names, but then again I might not.
--
Elliotte Rusty Harold elharo@m...
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim
|
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








