HTML:XML数据岛不会链接

时间:2014-12-12 21:26:20

标签: html xml

我无法将我的htm文件与我的xml文件链接,或者如果它是链接我无法使其工作。

这对于我正在上课而且我知道数据岛现在几乎已经灭绝,但这并没有改变我的任务。

所以,我有XML和HTM,我查看了4个不同的来源,并且看不到我的代码链接这两个有什么问题,但它似乎不起作用,那就是我的整个身体部分也是如此。任何人都可以看到错误吗?

谢谢!

HTM:

<html>
<head>
<!--NewsDisplay.htm -->
<xml id="newsInfo" src="News.xml"></xml>
<title>News Display</title>
<style>
body {background-color:rgb(255,255,192)}
#News_Title {font-family:Ariel, Helvetica, sans-serif; font-size:40pt}
#News_Author {font-family:Ariel, Helvetica, sans-serif; font-size:15pt}
#News_Text {font-family:Ariel, Helvetica, sans-serif}

</style>
</head>

<body>

<div id="News_Text"> S************* 12/12/14</div>
<div id="News_Title" datasrc="#newsInfo" datafld="Title"></div>
<div id="News_Author" datasrc="#newsInfo" datafld="Author"></div>
<div id="News_Text" datasrc="#newsInfo" datafld="Newsdata"></div>
</body>

</html>

XML

<?xml version ="1.0"?>
<!--News.xml-->

<Information>
    <Title>Recognize the components of the Visual Basic Editor </Title>
    <Author>Garry Gibson </Author>
<Newsdata>
<![CDATA[
Visual Basic for Applications is an excellent built-in tool for customizing or
automating operations within the Microsoft Office application packages as well
as many non-Microsoft software packages. The Visual Basic Editor is actually a set of
three windows: the main, the Project Explorer and Properties windows. The main window
comprised of the title bar, menu bar and the Standard toolbar appears at the top of the
screen. The Properties window includes characteristics for each object controlling its 
appearance and behavior. Within the Project Explorer window is the Code window that is 
opened whenever VBA instructions called a procedure are entered as a block of code.
]]>

</Newsdata>
</Information>

0 个答案:

没有答案