xml是元标记语言,与html不同,它只承载数据,类似数据库.
若要它呈现出样式,可与html配合或用xslt和css
若要它呈现出样式,可与html配合或用xslt和css
解决方案 »
- 字符串赋值给结构体中的字符串出错,求解答
- 请问以下的URI有什么问题
- 如何在后台获取前台克隆的下拉列表的内容
- 如何将DataGrid的数据绑定转换成c#的类文件使用Sqlhelper调用!!在线等啊。急迫等!555
- ADOX创建Access数据库中约束的设定
- 怎样使控件只刷新一部分窗口
- 问题,关于datetimepicker
- 这题用C#怎么写
- 高分请教Together for .Net高手
- 该字符未被识别为有效的DataTime,哪里有问题?应该怎么改
- 有没有办法将xml文件自动转换为可以在浏览器中以html网页显示的程序,免去手工编写css之类的配套代码的麻烦
- 我在跟帖中,提示说我用了非法词或词组不存在,请问:什么样的词组叫非法词组和词组不存在
books.xml文件如下:
<?xml version="1.0"?>
<?xml-stylesheet href="Books.css" type="text/css"?>
<books>
<book>
<title>Beginning ASP.NET</title>
<ISBM>1-861006-15-2</ISBM>
<authors>
<author>Chiris Ullman</author>
<author>Ollie Cornes</author>
<author>John Kauffman</author>
<author>Rob Birdwell</author>
</authors>
<description>ASP.NET is a powerful technology for.....</description>
<price US="$49.99"/>
</book>
</books>再写一个books.css,用于控制xml的显示:title
{
display:block;
font-family:Courier New;
font-size:large;
font-weight:bold;
color:Red;
text-align:center;
}
ISBN
{
display: block;
font-family: 宋体;
font-size: medium;
font-weight: bold;
color: Black;
text-align: left;
}
authors
{
display: block;
font-family: 宋体;
font-size: small;
font-weight: normal;
color: Black;
text-align: left;
}
description
{
display: block;
font-family: 宋体;
font-size: small;
font-weight: normal;
color: Black;
text-align: left;
}然后就可以了。