html 页面上的不同 XML 数据

发布于 2025-01-02 23:48:16 字数 6167 浏览 0 评论 0原文

我的 Intranet 中有不同的 XML 文件,每 5 分钟刷新一次。数据在每个刷新间隔都会更改..,我想创建一个 HTML 页面,在其中可以显示所有 XML 提要。 创建和创建的最佳方式是什么?在单个页面上加载不同的 XML feed 我在 Dreamweaver 中使用 Spry..此代码可以在 IE 中运行,但不能在 Firefox 中运行

    <html xmlns:spry="http://ns.adobe.com/spry"><body background="SpryAssets/mantra.jpg">
<p>
  <script  src="SpryAssets/xpath.js" type="text/javascript">
</script>
  <script  src="SpryAssets/SpryData.js" type="text/javascript">
</script>
  </div>
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table width="852" align="center" border="0">
<tr>
      <th width="740" scope="col"><strong class="Fn">Now playing </strong></th>
      <th width="102" scope="col"><a href="index.html" title="Reload" target="_parent" class="rm1"><span class="Fn">Reload</span></a></th>
  </tr>
</table>
</p>
<table width="850" border="0">

</table>
<script  type="text/javascript">
var Agra = new Spry.Data.XMLDataSet("http://59.90.73.143/Agraexport.xml", "nexgen_audio_export/audio");
var Bareilly = new Spry.Data.XMLDataSet("http://59.90.73.143/bareillyexport.xml", "nexgen_audio_export/audio");
var Gorakhpur = new Spry.Data.XMLDataSet("http://59.90.73.143/Gorakhpurexport.xml", "nexgen_audio_export/audio");
var Hisar = new Spry.Data.XMLDataSet("http://59.90.73.143/Hisarexport.xml", "nexgen_audio_export/audio");
var Jalandhar = new Spry.Data.XMLDataSet("http://59.90.73.143/Jalandharexport.xml", "nexgen_audio_export/audio");
var Karnal = new Spry.Data.XMLDataSet("http://59.90.73.143/Karnalexport.xml", "nexgen_audio_export/audio");
var Ranchi = new Spry.Data.XMLDataSet("http://59.90.73.143/Ranchiexport.xml", "nexgen_audio_export/audio");
var Varanasi = new Spry.Data.XMLDataSet("http://59.90.73.143/VARANASIEXPORT.xml", "nexgen_audio_export/audio");
</script>
<div spry:region="Agra">
  <table width="852" align="center" bgcolor="#252525" border="1" cellpadding="1" cellspacing="2">
    <tr>
      <th width="99" class="Fn" spry:sort="type">City</th>
      <th width="427" class="rm1" spry:sort="title"><span class="Fn">Title</span></th>
      <th class="Fn" spry:sort="artist">Artist</th>
    </tr>
    <tr spry:repeat="Agra">
      <td><div align="center" class="rm1">
        <div align="left">Agra</div>
      </div></td>
      <td class="rm1">{title}</td>
      <td class="rm1">{artist}      </td>
    </tr>
  </table>
</div>
<div spry:region="Bareilly">
  <table width="852" align="center" bgcolor="#252525" border="1" cellpadding="1" cellspacing="2">
      <tr spry:repeat="Bareilly">
        <td width="99"><div align="center" class="rm1">
          <div align="left">Bareilly 
          </div>
        </div></td>
        <td width="429" class="rm1">{title}</td>
        <td class="rm1">{artist}</td>
      </tr>
  </table>
</div>
</div>
<div spry:region="Gorakhpur">
  <table width="852" align="center" bgcolor="#252525" border="1" cellpadding="1" cellspacing="2">
      <tr spry:repeat="Gorakhpur">
      <td width="99"><div align="center" class="rm1">
        <div align="left">Gorakhpur</div>
      </div></td>
        <td width="429" class="rm1">{title}</td>
        <td class="rm1">{artist}</td>
    </tr>
  </table>
</div>
<div spry:region="Hisar">
  <table width="852" align="center" bgcolor="#252525" border="1" cellpadding="1" cellspacing="2">
      <tr spry:repeat="Hisar">
      <td width="99"><div align="center" class="rm1">
        <div align="left">Hisar</div>
      </div></td>
        <td width="429" class="rm1">{title}</td>
        <td class="rm1">{artist}</td>
    </tr>
  </table>
</div>
<div spry:region="Jalandhar">
  <table width="852" align="center" bgcolor="#252525" border="1" cellpadding="1" cellspacing="2">
      <tr spry:repeat="Jalandhar">
      <td width="99"><div align="center" class="rm1">
        <div align="left">Jalandhar</div>
      </div></td>
        <td width="429" class="rm1">{title}</td>
        <td class="rm1">{artist}</td>
    </tr>
  </table>
</div>
<div spry:region="Karnal">
  <table width="852" align="center" bgcolor="#252525" border="1" cellpadding="1" cellspacing="2">
      <tr spry:repeat="Karnal">
      <td width="99"><div align="center" class="rm1">
        <div align="left">Karnal</div>
      </div></td>
        <td width="429" class="rm1">{title}</td>
        <td class="rm1">{artist}</td>
    </tr>
  </table>
</div>
<div spry:region="Ranchi">
<table width="852" align="center" bgcolor="#252525" border="1" cellpadding="1" cellspacing="2">
      <tr spry:repeat="Ranchi">
      <td width="99"><div align="center" class="rm1">
        <div align="left">Ranchi</div>
      </div></td>
        <td width="429" class="rm1">{title}</td>
        <td class="rm1">{artist}</td>
    </tr>
  </table>
</div>
<div spry:region="Varanasi">
<table width="852" align="center" bgcolor="#252525" border="1" cellpadding="1" cellspacing="2">
      <tr spry:repeat="Varanasi">
      <td width="99"><div align="center" class="rm1">
        <div align="left">Varanasi</div>
      </div></td>
        <td width="429" class="rm1">{title}</td>
        <td class="rm1">{artist}</td>
    </tr>
  </table>
</div>
</body>
</html>

I have different XML files in my intranet which is getting refreshed every 5 min & Data get changed on every refresh interval.., i want to create a HTML page where i can show all my XML feed.
what is a best way to create & load different XML feed on a single page
I am using Spry in Dreamweaver.. this code is working in IE but not in firefox

    <html xmlns:spry="http://ns.adobe.com/spry"><body background="SpryAssets/mantra.jpg">
<p>
  <script  src="SpryAssets/xpath.js" type="text/javascript">
</script>
  <script  src="SpryAssets/SpryData.js" type="text/javascript">
</script>
  </div>
</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<table width="852" align="center" border="0">
<tr>
      <th width="740" scope="col"><strong class="Fn">Now playing </strong></th>
      <th width="102" scope="col"><a href="index.html" title="Reload" target="_parent" class="rm1"><span class="Fn">Reload</span></a></th>
  </tr>
</table>
</p>
<table width="850" border="0">

</table>
<script  type="text/javascript">
var Agra = new Spry.Data.XMLDataSet("http://59.90.73.143/Agraexport.xml", "nexgen_audio_export/audio");
var Bareilly = new Spry.Data.XMLDataSet("http://59.90.73.143/bareillyexport.xml", "nexgen_audio_export/audio");
var Gorakhpur = new Spry.Data.XMLDataSet("http://59.90.73.143/Gorakhpurexport.xml", "nexgen_audio_export/audio");
var Hisar = new Spry.Data.XMLDataSet("http://59.90.73.143/Hisarexport.xml", "nexgen_audio_export/audio");
var Jalandhar = new Spry.Data.XMLDataSet("http://59.90.73.143/Jalandharexport.xml", "nexgen_audio_export/audio");
var Karnal = new Spry.Data.XMLDataSet("http://59.90.73.143/Karnalexport.xml", "nexgen_audio_export/audio");
var Ranchi = new Spry.Data.XMLDataSet("http://59.90.73.143/Ranchiexport.xml", "nexgen_audio_export/audio");
var Varanasi = new Spry.Data.XMLDataSet("http://59.90.73.143/VARANASIEXPORT.xml", "nexgen_audio_export/audio");
</script>
<div spry:region="Agra">
  <table width="852" align="center" bgcolor="#252525" border="1" cellpadding="1" cellspacing="2">
    <tr>
      <th width="99" class="Fn" spry:sort="type">City</th>
      <th width="427" class="rm1" spry:sort="title"><span class="Fn">Title</span></th>
      <th class="Fn" spry:sort="artist">Artist</th>
    </tr>
    <tr spry:repeat="Agra">
      <td><div align="center" class="rm1">
        <div align="left">Agra</div>
      </div></td>
      <td class="rm1">{title}</td>
      <td class="rm1">{artist}      </td>
    </tr>
  </table>
</div>
<div spry:region="Bareilly">
  <table width="852" align="center" bgcolor="#252525" border="1" cellpadding="1" cellspacing="2">
      <tr spry:repeat="Bareilly">
        <td width="99"><div align="center" class="rm1">
          <div align="left">Bareilly 
          </div>
        </div></td>
        <td width="429" class="rm1">{title}</td>
        <td class="rm1">{artist}</td>
      </tr>
  </table>
</div>
</div>
<div spry:region="Gorakhpur">
  <table width="852" align="center" bgcolor="#252525" border="1" cellpadding="1" cellspacing="2">
      <tr spry:repeat="Gorakhpur">
      <td width="99"><div align="center" class="rm1">
        <div align="left">Gorakhpur</div>
      </div></td>
        <td width="429" class="rm1">{title}</td>
        <td class="rm1">{artist}</td>
    </tr>
  </table>
</div>
<div spry:region="Hisar">
  <table width="852" align="center" bgcolor="#252525" border="1" cellpadding="1" cellspacing="2">
      <tr spry:repeat="Hisar">
      <td width="99"><div align="center" class="rm1">
        <div align="left">Hisar</div>
      </div></td>
        <td width="429" class="rm1">{title}</td>
        <td class="rm1">{artist}</td>
    </tr>
  </table>
</div>
<div spry:region="Jalandhar">
  <table width="852" align="center" bgcolor="#252525" border="1" cellpadding="1" cellspacing="2">
      <tr spry:repeat="Jalandhar">
      <td width="99"><div align="center" class="rm1">
        <div align="left">Jalandhar</div>
      </div></td>
        <td width="429" class="rm1">{title}</td>
        <td class="rm1">{artist}</td>
    </tr>
  </table>
</div>
<div spry:region="Karnal">
  <table width="852" align="center" bgcolor="#252525" border="1" cellpadding="1" cellspacing="2">
      <tr spry:repeat="Karnal">
      <td width="99"><div align="center" class="rm1">
        <div align="left">Karnal</div>
      </div></td>
        <td width="429" class="rm1">{title}</td>
        <td class="rm1">{artist}</td>
    </tr>
  </table>
</div>
<div spry:region="Ranchi">
<table width="852" align="center" bgcolor="#252525" border="1" cellpadding="1" cellspacing="2">
      <tr spry:repeat="Ranchi">
      <td width="99"><div align="center" class="rm1">
        <div align="left">Ranchi</div>
      </div></td>
        <td width="429" class="rm1">{title}</td>
        <td class="rm1">{artist}</td>
    </tr>
  </table>
</div>
<div spry:region="Varanasi">
<table width="852" align="center" bgcolor="#252525" border="1" cellpadding="1" cellspacing="2">
      <tr spry:repeat="Varanasi">
      <td width="99"><div align="center" class="rm1">
        <div align="left">Varanasi</div>
      </div></td>
        <td width="429" class="rm1">{title}</td>
        <td class="rm1">{artist}</td>
    </tr>
  </table>
</div>
</body>
</html>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

那请放手 2025-01-09 23:48:16

最好的方法是使用 XSLT 将数据转换为 html,这样您就可以将每个文件指向样式表并获取所需的 html

The best way is to use XSLT to convert your data in to html, so that you point each file at the stylesheet and get out the html you want

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文