XSL
来源:互联网 发布:linux sprintf 编辑:程序博客网 时间:2024/04/30 02:51
XSL 一种用于显示xml结构的语言
cdcatalog.xml
<?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="cdcatalog.xsl"?><catalog> <cd> <title>Empire Burlesque</title> <artist>Bob Dylan</artist> <country>USA</country> <company>Columbia</company> <price>10.90</price> <year>1985</year> </cd> <cd> <title>Empire Burlesque</title> <artist>Bob Dylan</artist> <country>USA</country> <company>Columbia</company> <price>10.90</price> <year>1985</year> </cd></catalog>通过xsl将xml显示为如下格式
cdcatalog.xsl
<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"> <html> <body> <h2>My CD Collection</h2> <table border="1"> <tr bgcolor="#9acd32"> <th align="left">Title</th> <th align="left">Artist</th> </tr> <xsl:for-each select="catalog/cd"> <tr> <td><xsl:value-of select="title"/></td> <td><xsl:value-of select="artist"/></td> </tr> </xsl:for-each> </table> </body> </html></xsl:template></xsl:stylesheet>
0 0
- XSL
- xsl
- XSL
- XSL
- XSL
- XSL
- xsl
- XSL
- XSL
- xsl
- XSL
- XSL:XSL基础之一
- xsl:variable/xsl:param
- xsl:choose, xsl:when 和 xsl:otherwise
- 增强 XSL
- XSL函数
- XSL语法
- XSL初学
- 使用c语言对mysql进行增删查改
- Hibernate 自动生成 hbm文件
- 间谍猫的娱乐:wifi设置,你太弱了
- linux ln 命令使用参数详解(ln -s 软链接)
- Poj--1466 Girls and Boys
- XSL
- ListView、GridView显示加动画
- 一些好的Android开源项目
- haproxy负载均衡服务器之搭建
- hdu-2795 Billboard
- 怎样破坏程序的堆栈?
- 24点游戏(粗判是否成立)
- CmakeLists.txt文档的使用
- MyEclipse内存不足问题