xml与html问题
时间:2011-12-06
来源:互联网
html文件
<html>
<head><title>使用表格绑定XML</title></head>
<body bgcolor="lightblue">
<XML id="XMLDdata" src="code7_1.xml"></XML>
<center><b><font size=""4>HTML表格中绑定显示XML文档内容</font></b></center>
<table datasrc="#XMLdata" border="1" cellpadding="5" align="center">
<thead>
<th>customerID</th>
<th>order_date</th>
<th>order_status</th>
<th>items</th>
</thead>
<tr>
<td><span datafld="customerID"></span></td>
<td><span datafld="order_date"></span></td>
<td><span datafld="order_status"></span></td>
<td><span datafld="items"></span></td>
</tr>
</table>
</body>
</html>
xml文件
<?xml version="1.0" encoding="gb2312" ?>
<orders>
<order>
<customerID>c05000069</customerID>
<order_date>20070103</order_date>
<order_status>pending</order_status>
<items>
<item>
<bookID>001</bookID>
<quantity>10</quantity>
<item_status>pending</item_status>
</item>
</items>
</order>
<order>
<customerID>c500701</customerID>
<order_date>2009.302</order_date>
<order_status>pending</order_status>
<items>
<item>
<bookID>002</bookID>
<quantity>30</quantity>
<item_status>pending</item_status>
</item>
<item>
<bookID>003</bookID>
<quantity>20</quantity>
<item_status>pending</item_status>
</item>
</items>
</order>
</orders>
为什么在浏览器上看不到xml文档里面的数据
<html>
<head><title>使用表格绑定XML</title></head>
<body bgcolor="lightblue">
<XML id="XMLDdata" src="code7_1.xml"></XML>
<center><b><font size=""4>HTML表格中绑定显示XML文档内容</font></b></center>
<table datasrc="#XMLdata" border="1" cellpadding="5" align="center">
<thead>
<th>customerID</th>
<th>order_date</th>
<th>order_status</th>
<th>items</th>
</thead>
<tr>
<td><span datafld="customerID"></span></td>
<td><span datafld="order_date"></span></td>
<td><span datafld="order_status"></span></td>
<td><span datafld="items"></span></td>
</tr>
</table>
</body>
</html>
xml文件
<?xml version="1.0" encoding="gb2312" ?>
<orders>
<order>
<customerID>c05000069</customerID>
<order_date>20070103</order_date>
<order_status>pending</order_status>
<items>
<item>
<bookID>001</bookID>
<quantity>10</quantity>
<item_status>pending</item_status>
</item>
</items>
</order>
<order>
<customerID>c500701</customerID>
<order_date>2009.302</order_date>
<order_status>pending</order_status>
<items>
<item>
<bookID>002</bookID>
<quantity>30</quantity>
<item_status>pending</item_status>
</item>
<item>
<bookID>003</bookID>
<quantity>20</quantity>
<item_status>pending</item_status>
</item>
</items>
</order>
</orders>
为什么在浏览器上看不到xml文档里面的数据
作者: zhaopei010203 发布时间: 2011-12-06
<XML id="XMLdata" src="code7_1.xml"></XML>
XMLdata 写成 XMLDdata了,多了个D
XMLdata 写成 XMLDdata了,多了个D
作者: hookee 发布时间: 2011-12-07
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28