2012-02-06 79 views
2

我的Intranet中有不同的XML文件,每5分鐘刷新一次&數據在每個刷新時間間隔都發生改變..,我想創建一個HTML頁面,可以顯示我所有的XML feed 。 什麼是單頁 我在Dreamweaver中使用輕快..此代碼工作在IE上創建&負載不同的XML飼料最好的方法,但不能在Firefoxhtml頁面上的不同XML數據

<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> 

回答

1

的最好方法是使用XSLT將您的數據轉換爲html,以便您將每個文件指向樣式表,然後獲取所需的html

+1

我的XML數據每5分鐘刷新一次。所以我認爲轉換爲XSLT並不能解決我的問題。 。 – 2012-02-07 07:38:13