asrc=#theXMLisland DataFLD=HomePage size="76"><BR>
电子邮件:<input type=text datasrc=#theXMLisland DataFLD=E-Mail size="76"><BR>
电话:<input type=text datasrc=#theXMLisland DataFLD=TelePhone size="76"><BR>
级别:<input type=text datasrc=#theXMLisland DataFLD=Grade size="76"><HR>
<input id="first" TYPE=button value="<< 第一条记录" onclick="theXMLisland.recordset.moveFirst()">
<input id="prev" TYPE=button value="<上一条记录" onclick="theXMLisland.recordset.movePrevious()">
<input id="next" TYPE=button value="下一条记录>" onclick="theXMLisland.recordset.moveNext()">
<input id="last" TYPE=button value="最后一条记录>>" onclick="theXMLisland.recordset.moveLast()">
<input id="Add" TYPE=button value="添加新记录" onclick="theXMLisland.recordset.addNew()">
<XML ID="theXMLisland">
<HotelList>
<Hotel>
<Name>四海大酒店</Name>
<Address>海魂路1号</Address>
<HomePage>
www.sihaohotel.com.cn</HomePage>
<E-Mail>master@sihaohotel.com.cn</E-Mail>
<TelePhone>(0989)8888888</TelePhone>
<Grade>五星级</Grade>
</Hotel>
<Hotel>
<Name>五湖宾馆</Name>
<Address>东平路99号</Address>
<HomePage>
www.wuhu.com.cn</HomePage>
<E-Mail>web@wuhu.com.cn</E-Mail>
<TelePhone>(0979)1111666</TelePhone>
<Grade>四星级</Grade>
</Hotel>
<Hotel>
<Name>“大沙漠”宾馆</Name>
<Address>留香路168号</Address>
<HomePage>
www.dashamohotel.com.cn</HomePage>
<E-Mail>master@dashamohotel.com.cn</E-Mail>
<TelePhone>(0989)87878788</TelePhone>
<Grade>五星级</Grade>
</Hotel>
<Hotel>
<Name>“画眉鸟”大酒店</Name>
<Address>血海飘香路2号</Address>
<HomePage>
www.throstlehotel.com.cn</HomePage>
<E-Mail>chuliuxiang@throstlehotel.com.cn</E-Mail>
<TelePhone>(099)9886666</TelePhone>
<Grade>五星级</Grade>
</Hotel>
</HotelList>
</XML>
</body>
</HTML> //xml数据岛中添加记录
-------------------------------
The following list is a sample of the properties and methods that you use to access nodes in an XML
document.
Property/ Method Description
XMLDocument Returns a reference to the XML Document Object Model (DOM) exposed by the object.
documentElement Returns the document root of the XML document.
childNodes Returns a node list containing the children of a node (if any).
item Accesses individual nodes within the list through an index. Index values are zero-based, so
item(0) returns the first child node.
text Returns the text content of the node.
The following code shows an HTML page containing an XML data island. The data island is contained within
the <XML> element.
<HTML>
<HEAD>
<TITLE>HTML with XML Data Island</TITLE>
</HEAD>
<BODY>
<P>Within this document is an XML data island.</P>
<XML ID="resortXML">
<resorts>
<resort code='1'>Adventure Works</resort>
<resort>Alpine Ski House</resort>
&l