Re: iTunes Music Store XML

[prev] [thread] [next] [lurker] [Date index for 2004/04/21]

From: Daniel Pittman
Subject: Re: iTunes Music Store XML
Date: 09:08 on 21 Apr 2004
On Tue, 20 Apr 2004, Thomas R. Sibley wrote:
> ARGH. The XML used in Apple's iTunes Music Store is already verbose as
> hell (which has it's benefits for them in flexibility of layout, so
> I'll let it slide), but what I can't figure out is why, oh why, they
> had to use markup like the following...
> 
> <dict>
>    ...
>    <key>kind</key><string>song</string>
>    <key>artistName</key><string>Hank Dogs</string>
>    <key>artistId</key><string>2730069</string>
>    <key>bitRate</key><integer>128</integer>
>    ...
> </dict>
> 
> Why aren't they properly using attributes... or even nesting the
> values as a child of the key?! How much harder would it be to generate
> something sane like:

Because that is the XML representation of the nextstep "dictionary"
format out of nextstep property list files.

Which was translated to XML in MacOS-X because, dude, XML is cool and
*everything* should be XML.  Even when XML results in a file five times
the size with zero additional meaning (or worse, meaning lost.

[...]

> But no. They can't do that. It's hate. Pure hate. It means, for the
> most part, assuming that the next element after a key element is its
> value.
> 
> And I can't imagine why they would do it that way.  Surely it makes it
> more difficult to parse and is more prone to breakage.  I mean, what
> gives?

*nod*  It made much more sense when it read:

{ "kind" = "song"; "artistName" = "Hank Dogs"; }

This is why I hate, hate, hate the XML crowd - there isn't anything
wrong with XML as such, but the people who use it because sticking XML
onto something makes it oh, so much better...

Gah.  At least it is not as bad as one group using XML, for "starship
design" IIRC, who do the XML tag:

  <bitfield width="8">
      <bit>1</bit>
      ...
  </bitfield>

This was, for what it is worth, the way their binary data files around.
They used XML attributes to hold bit-fields, the meaning of which was
known only to their software.

I was ... horrified.

  Daniel

-- 
Tomatoes and oregano make it Italian; wine and tarragon make it
French. Sour cream makes it Russian; lemon and cinnamon make it Greek.
Soy sauce makes it Chinese; garlic makes it good.
        -- Alice May Brock

Generated at 14:02 on 01 Jul 2004 by mariachi 0.52