Z
zsy146
Unregistered / Unconfirmed
GUEST, unregistred user!
我是新学XML的,现在有如下代码,HTML中不能显示XML中的数据,请问是什么原因?在写代码的过程中要注意什么问题?
<!-- books.htm -->
<html>
<Head><title>Books</title></Head>
<Body>
<XML ID="XMLbook"
SRC="books.xml"></XML>
<table DATASRC ="#XMLbook"
border = "1"
Cellpadding="5">
<thead><th>title</th><th>isbn</th></thead>
<tr>
<td><span DTATFLD= "title"></span></td>
<td><span DTATFLD= "isbn"></span></td>
</tr>
</table>
</Body>
</html>
************************************************
<!--books.xml-->
<?xml version="1.0"
encoding="GB2312"?>
<booklist>
<book>
<title>Straight Talk About Computers</title>
<isbn>72-80088-005</isbn>
</book>
<book>
<title> Gourmet Microwave </title>
<isbn>72-80081-082</isbn>
</book>
</booklist>
<!-- books.htm -->
<html>
<Head><title>Books</title></Head>
<Body>
<XML ID="XMLbook"
SRC="books.xml"></XML>
<table DATASRC ="#XMLbook"
border = "1"
Cellpadding="5">
<thead><th>title</th><th>isbn</th></thead>
<tr>
<td><span DTATFLD= "title"></span></td>
<td><span DTATFLD= "isbn"></span></td>
</tr>
</table>
</Body>
</html>
************************************************
<!--books.xml-->
<?xml version="1.0"
encoding="GB2312"?>
<booklist>
<book>
<title>Straight Talk About Computers</title>
<isbn>72-80088-005</isbn>
</book>
<book>
<title> Gourmet Microwave </title>
<isbn>72-80081-082</isbn>
</book>
</booklist>