xml与xsl
来源:互联网 发布:mac系统的下载栏不见了 编辑:程序博客网 时间:2024/06/06 05:41
xml与xsl的关系就相当于html与css的关系
XSL是指可扩展样式表语言 (EXtensible Stylesheet Language),是一种用于以可读格式呈现 XML 数据的语言。
xsl简单实例
xml文档
<?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="demo.xsl"?><!-- Edited with XML Spy v2007 (http://www.altova.com) --><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>Hide your heart</title> <artist>Bonnie Tyler</artist> <country>UK</country> <company>CBS Records</company> <price>9.90</price> <year>1988</year> </cd> <cd> <title>Greatest Hits</title> <artist>Dolly Parton</artist> <country>USA</country> <company>RCA</company> <price>9.90</price> <year>1982</year> </cd> <cd> <title>Still got the blues</title> <artist>Gary Moore</artist> <country>UK</country> <company>Virgin records</company> <price>10.20</price> <year>1990</year> </cd></catalog>
xsl文档[demo.xsl]
<?xml version="1.0" encoding="ISO-8859-1"?><!-- Edited with XML Spy v2007 (http://www.altova.com) --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes'/><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><th align="left">country</th></tr><xsl:for-each select="catalog/cd"><tr><td><xsl:value-of select="title"/></td><td><xsl:value-of select="artist"/></td><td><xsl:value-of select="country"/></td></tr></xsl:for-each></table></body></html></xsl:template></xsl:stylesheet>
- XML与XSL
- Xml与xsl连接
- xml与xsl
- XML (5) xsl:variable 与 xsl:param
- xml 与 xsl 显示图片
- xsl与xml的初次见面
- xml与xsl的转换
- xsl与xml转换示例
- xml与xsl的转换
- XML系列:xsl与xml组织数据
- 基于XML-XSL的订单存储与拆分. xsl:function与xsl:result-document XSLT2.0
- 用XSL与XML实现多级菜单
- JavaScript与XML XSL的综合使用
- xml与xsl-fo生成PDF
- xml+xsl与html的结合
- XML: XSL
- XSL-XML
- XML介绍之XML使用CSS与XSL修饰
- Android MD5加密
- xml基础知识学习笔记
- POJ 3659 Cell Phone Network 最小支配集模板题(树形dp)
- Window 8 专业版安装Visual Studio2012问题(个人)
- ubuntu tftpd配置
- xml与xsl
- 15个步骤创立技术公司,并收获千万用户(一)
- 国内开发板发展情况分析
- OCP-1Z0-051-V9.02-39题
- OpenCV参考手册之Mat类详解(一)
- 平面上N个点,每两个点都确定一条直线, 求出斜率最大的那条直线所通过的两个点
- 森林与二叉树的转换 (转)
- 贝叶斯分类在邮件分类
- 网络子系统60_路由子系统初始化蓝图