![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - XML newbie (for each) [Thread Next] Re: XML newbie (for each)To: NULL Date: 4/1/2005 2:41:00 AM Try the following XSLT: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml"/> <xsl:template match="/"> <collection> <xsl:for-each select="collection/cd[artist='The Beatles' and year='1966']"> <cd> <title><xsl:value-of select="./title"/></title> <artist><xsl:value-of select="./artist"/></artist> <year><xsl:value-of select="./year"/></year> </cd> </xsl:for-each> </collection> </xsl:template> </xsl:stylesheet> | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
