标题:求助:XML导出
取消只看楼主
yunj1105
Rank: 1
等 级:新手上路
威 望:1
帖 子:757
专家分:0
注 册:2007-2-13
 问题点数:0 回复次数:1 
求助:XML导出
在技术教程里学xml可就是调不出来 大家帮忙看看
cd.xml:
<?xml version="1.0" encoding="utf-8" ?>
<CATALOG>
<CD>
<TITLE>Empire Burlesque</TITLE>
<ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1985</YEAR>
</CD>
<CD>
<TITLE>Hide your heart</TITLE>
<ARTIST>Bonnie Tylor</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>CBS Records</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1988</YEAR>
</CD>
<CD>
<TITLE>Greatest Hits</TITLE>
<ARTIST>Dolly Parton</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>RCA</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1982</YEAR>
</CD>
<CD>
<TITLE>Still got the blues</TITLE>
<ARTIST>Gary More</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>Virgin redords</COMPANY>
<PRICE>10.20</PRICE>
<YEAR>1990</YEAR>
</CD>
<CD>
<TITLE>Eros</TITLE>
<ARTIST>Eros Ramazzotti</ARTIST>
<COUNTRY>EU</COUNTRY>
<COMPANY>BMG</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1997</YEAR>
</CD>
</CATALOG>
cd.hml
<head>
<title>无标题页</title>
<script for="window" event="onload">
XMLdso.XMLDocument.load("cd.xml");
</script>
<script language="JavaScript">
function movenext()
{
if (XMLdso.recordset.absoluteposition < XMLdso.recordset.recordcount)
{
XMLdso.recordset.movenext();
}
}
function moveprevious()
{
if (XMLdso.recordset.absoluteposition > 1)
{
XMLdso.recordset.moveprevious();
}
}
</script>
</head>
<body>
<object WIDTH="0" HEIGHT="0" CLASSID="clsid:550dda30-0541-11d2-9ca9-0060b0ec3d39" ID="XMLdso"></object>
<table>
<tr><td>Title:</td><td><SPAN ID="title" DATASRC=#XMLdso DATAFLD="TITLE"></SPAN></td></tr>
<tr><td>Artist:</td><td><SPAN ID="artist" DATASRC=#XMLdso DATAFLD="ARTIST"></SPAN></td></tr>
<tr><td>Year:</td><td><SPAN ID="year" DATASRC=#XMLdso DATAFLD="YEAR"></SPAN></td></tr>
<tr><td>Country:</td><td><SPAN ID="country" DATASRC=#XMLdso DATAFLD="COUNTRY"></SPAN></td></tr>
<tr><td>Company:</td><td><SPAN ID="company" DATASRC=#XMLdso DATAFLD="COMPANY"></SPAN></td></tr>
<tr><td>Price:</td><td><SPAN ID="price" DATASRC=#XMLdso DATAFLD="PRICE"></SPAN></td></tr>
</table>
<INPUT TYPE=button VALUE="上一张CD" ONCLICK="moveprevious()">
<INPUT TYPE=button VALUE="下一张CD" ONCLICK="movenext()">
</body>
</html>

[此贴子已经被作者于2007-8-21 14:43:05编辑过]

搜索更多相关主题的帖子: XML 
2007-08-21 11:21
yunj1105
Rank: 1
等 级:新手上路
威 望:1
帖 子:757
专家分:0
注 册:2007-2-13
得分:0 
好了放出来了呵呵

2007-08-21 14:43



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-164300-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016546 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved