使用css让XML文件按照HTML的风格显示出来
attrib.css
name
{
display:block;
color:blue;
font-size:20pt;
font-weight:bold;
}
id,company,email,tel,site
{
display:block;
color:black;
font-size:14pt;
font-weight:normal
font-style:italic;
}
xml_css.xml
<?xml version="1.0" encoding="GB2312" standalone="no"?>
<?xml-stylesheet type="text/css" href="attrib.css"?>
<addresslist>
<linkman>
<name>许兴平</name>
<id>001</id>
<company>三星电子</company>
<email>xingping.xu@samsung.com</email>
<tel>18511769744</tel>
<site>www.xingping.com</site>
</linkman>
</addresslist>
ya tudou