XML简明教程(3)什么是XML数据岛

来源:互联网 发布:安卓软件源码是什么 编辑:程序博客网 时间:2024/05/01 07:25
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
数据岛是指存在于HTML页面中的XML代码。数据岛允许你在HTML页面中集成XML,对XML

写脚本,而不需要通过脚本或<OBJECT>标签读取XML。几乎所有能够存在于一个结构完整

XML文档中的东西都能存在于一个数据岛中。包括处理指示、DOCTYPE声明和内部子集

。(注意,编码串不能放在数据岛中。)

<XML>元素标记数据岛的开始,它的ID属性提供了一个可以用来引用数据岛的名称。

数据岛XML可以是内嵌的:

<XML ID="XMLID">

<customer>

<name>Herbert Hanley</name>

<custID>81422</custID>

</customer> 

</XML>

或者在XML标签中通过SRC属性引用:

<XML ID="XMLID" SRC="customer.XML"></XML>

也可以使用<SCRIPT>标签来创建一个数据岛

<SCRIPT LANGUAGE="XML" ID="XMLID">

<customer>

<name>Mark Hanson</name>

<custID>81422</custID>

</customer>

</SCRIPT>

<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
原创粉丝点击