xml中以下代码的css怎么写,求大虾赐教。
<body><knowledge><skill>SunCertifiedProgrammerfortheJava2Platform</skill><skill>Famil...
<body>
<knowledge>
<skill>Sun Certified Programmer for the Java 2 Platform</skill>
<skill>
Familiar with all of the following programming languages:
<subskill>C/C++</subskill>
<subskill>Java</subskill>
<subskill>PHP, Perl</subskill>
</skill>
<skill>
Experience in large-scale software design and development
<subskill>Managed design of a university-wide computer equipment circulation tool</subskill>
<subskill>Developed a web-based university course application and application review system</subskill>
</skill>
</knowledge>
</body> 展开
<knowledge>
<skill>Sun Certified Programmer for the Java 2 Platform</skill>
<skill>
Familiar with all of the following programming languages:
<subskill>C/C++</subskill>
<subskill>Java</subskill>
<subskill>PHP, Perl</subskill>
</skill>
<skill>
Experience in large-scale software design and development
<subskill>Managed design of a university-wide computer equipment circulation tool</subskill>
<subskill>Developed a web-based university course application and application review system</subskill>
</skill>
</knowledge>
</body> 展开
2个回答
展开全部
不太清楚你具体要什么样式,如果你是问如何引用样式文件,那么应该在xml文件头部加入类似的代码
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="demo.css"?>
<body>
...
</body>
demo.css文件内容你自己定义咯,例如
@charset “utf-8”
body {font-size: 12px; background-color: #eee;}
追问
首先谢谢你的回答,头文件我已经加过了。
我想问的是,比如这段代码,"Shanghai Jiao Tong University",school 的name属性怎么显示出来?
追答
这个是无法显示的,即便显示出来也无法满足你的要求(例如school[name="Shanghai"]:after {content: 'Shanghai'},这只是一种简易的文字处理,而且没有通用性)。建议楼主考虑使用xslt,这是一个极佳的方式来格式化xml文件
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询