[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] attribute list
I am trying to loop through the child elements of an element using xslt and use the elemnt names of the child nodes as column headers for an html table. the xml packet looks like this <CUSTOMER> <CUSTOMER_ID>0000000026</CUSTOMER_ID> <COMPANY>Aero Atlanta Fl</COMPANY> <NAME>Aero Atlanta Flying Club</NAME> <MAILBOX></MAILBOX> <STREET>P.O. Box 819</STREET> <POSTCODE>30144</POSTCODE> <CITY>Kennesaw,</CITY> <PHONE></PHONE> <FAX></FAX> </CUSTOMER> what i want to do is dynamically display the child elements as headers in an html table, like this : <table> <tr> <td>CUSTOMER_ID</td><td>COMPANY</td><td>NAME</td><td>MAILBOX</td><td>STREET< /td><td>POSTCODE</td><td>CITY</td><td>PHONE</td><td>FAX</td> </tr> <table> this doesnt work: <TABLE cellpadding="3" border="2"> <TR> <xsl:for-each select="CUSTOMERS"> <TD><xsl:value-of select="@name"/></TD> </xsl:for-each> </TR> </table> I cant figure out how to get at the value of a child element name from within a recursive loop ..... any suggestions ? thanks, paul XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|