xslt question re transforming XML to HTML

wxdqz

New Member
How do you get the list of elements in an xmldocument using xslt?I am trying to find a generic way to create an html table that alsocontains column captions (element name) without knowing the elementnames in the xml file.for example:THIS XML file, using XSLT<?xml version="1.0" ?><products><tool><name>Hammer</name><price>9.99</price></tool><tool><name>Hammer Deluxe</name><price>14.99</price></tool><tool><name>Wrench</name><price>11.49</price></tool></products>TO PRODUCE HTML file that looks like thistool name priceHammer 9.99Hammer 14.99Wrench 11.49xslt like this<xsl:apply-templates select="tool/*" />gives back9.9914.9911.49genericly gets values, but no element namesThanks,Ari
 
Back
Top