>
> > Before you go to the dark side, just consider this:
> > http://coolaj86.blogspot.com/2010_03_01_archive.html#606168721267093296
>
> At least compare apples to apples. The XML example you gave has a lot
> more information in it than the JSON example does. If you want to
> compare the two the XML would look more like this
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <service name="shell">
> <disable>yes</disable>
> <socket_type>stream</socket_type>
> <wait>no</wait>
> <user>root</user>
> <server>/usr/libexec/rshd</server>
> <groups>yes</groups>
> <flags>REUSE</flags>
> </service>
>
> I have no deep love for XML, but the fragment above is just as
> readable as the JSON example.
>
First:
key : value
makes sense
key : value : key
Huh?
Second:
For XML to be simple you have to have some sort of set of assumptions to
live by.
XML isn't self documenting by design.
You've chosen a very proper constraint - you're only using the
key : value : key
pattern rather than the complicated
key[subkey : value] : node
( where node => text | tag | node )
pattern
If all XML were like that then you'd still have the problem of figuring out
how to differentiate between maps and collections
<people>
<bob>some value</bob>
<people>
vs
<people>
<person>
<name>bob</name>
</person>
</people>
And how would you interpret the following?
<appendages >
<arm type="left">
<arm type="right">
<leg type="left">
<leg type="right">
</appendages>
or this?
<body>
<arms>
<arm type="left">
<arm type="right">
</arms>
<legs>
<leg type="left">
<leg type="right">
</legs>
</body>
The collections don't follow a natural model
this does
body : {
arms : ["left", "right"],
legs : ["left", "right"]
}
--------------------
BYU Unix Users Group
http://uug.byu.edu/
The opinions expressed in this message are the responsibility of their
author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG.
___________________________________________________________________
List Info (unsubscribe here): http://uug.byu.edu/mailman/listinfo/uug-list