|
| Hi i am new at XML, and XSLT...
I have this file: below, I am only trying to get the name and artist, not
the track id ...however when i try and transform it, i get all of it...I
haven't been able to figure out how to get just the name and artist. xml,
and xslt below.
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<dict>
<key>Tracks</key>
<dict>
<key>35</key>
<dict>
<key>Track ID</key><integer>35</integer>
<key>Name</key><string>Lady Marmalade</string>
<key>Artist</key><string>Moulin Rouge</string>
<key>Date</key><string>3/3/05</string>
</dict>
<key>36</key>
<dict>
<key>Track ID</key><integer>36</integer>
<key>Name</key><string>Shook Me All Night Long</string>
<key>Artist</key><string>AC/DC</string>
<key>Date</key><string>3/3/05</string>
</dict>
</dict>
</dict>
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="dict " >
<xsl:value-of select="dict" />
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
any help would be appricated!!! thanks
|
|