R
Richard Rudie
Have any other Windows iTunes users looked at the XML file iTunes uses as
its database? (Does iTunes for Mac use an XML file, too?) When I noticed
that it was XML, I thought it might be useful, or at least instructional, to
create an XSLT file or few to filter and format the database.
So I opened it in a text editor, and found a bunch of poorly-designed XML
structure---or so it seems to me, as I wouldn't be posting a question
otherwise. The elements are arranged like so:
<key>27</key>
<dict>
<key>Name</key><string>Piano Smasher</string>
<key>Artist</key><string>Blue Man Group</string>
<key>Album</key><string>The Complex</string>
<key>Track Number</key><integer>7</integer>
<key>Year</key><integer>2003</integer>
<key>Date Added</key><date>2005-01-15T07:12:26Z</date>
</dict>
Is there a means to go about matching those pairs of elements in XSLT? Using
a <xsl:template match="key"> would leave out the following <dict>, <string>,
<integer>, <date>, or whatever else.
To transform a track listing into an HTML table row, for example. How would
one go about getting the <string> associated with (that follows) the "Name"
<key>, to put it into the HTML <td>?
I suspect I'd be better off writing a Perl preprocessor to change the
<key><xxx> element pairs into <item key="..." data="..."/> or the like
before attempting to XSLize it.
Remove the mislead to reply.
its database? (Does iTunes for Mac use an XML file, too?) When I noticed
that it was XML, I thought it might be useful, or at least instructional, to
create an XSLT file or few to filter and format the database.
So I opened it in a text editor, and found a bunch of poorly-designed XML
structure---or so it seems to me, as I wouldn't be posting a question
otherwise. The elements are arranged like so:
<key>27</key>
<dict>
<key>Name</key><string>Piano Smasher</string>
<key>Artist</key><string>Blue Man Group</string>
<key>Album</key><string>The Complex</string>
<key>Track Number</key><integer>7</integer>
<key>Year</key><integer>2003</integer>
<key>Date Added</key><date>2005-01-15T07:12:26Z</date>
</dict>
Is there a means to go about matching those pairs of elements in XSLT? Using
a <xsl:template match="key"> would leave out the following <dict>, <string>,
<integer>, <date>, or whatever else.
To transform a track listing into an HTML table row, for example. How would
one go about getting the <string> associated with (that follows) the "Name"
<key>, to put it into the HTML <td>?
I suspect I'd be better off writing a Perl preprocessor to change the
<key><xxx> element pairs into <item key="..." data="..."/> or the like
before attempting to XSLize it.
Remove the mislead to reply.