This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Microsoft XML > March 2005 > Newbie ..XSLT transformation help!!





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Newbie ..XSLT transformation help!!
asasd

2005-03-18, 6:45 pm

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


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews