posted 22 years ago
Hello
I am curious as to why i do not see any of the stock data from the feed in the table , does not seem to be picking it up. all i get is the topline saying "stock quote".
below is the xml file and the xsl template file.
<%
startTable="<table bgColor=#f0f8ff border=0 cellPadding=2 WIDTH=100% cellSpacing=0><tr><td bgcolor=midnightblue><font color=white face=Arial size=2><strong>"
startTableEnd="</strong></font></td></tr>"
endTable="</table>"
'Load the XML
set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = false
'Server.MapPath("home_News.xml")
'Load the XSL
set xsl = Server.CreateObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load "home_quote.xsl"
'stock quote
xml.load("http://www.topinvestor.co.uk/xml/symbolGet.asp?GMC=100&Symbol=SGT")
newsName=" Stock Quote"
'Response.Write(startTable&newsName&startTableEnd&replace(xml.transformNode(xsl),"</br>","")&endTable)
'News=replace(xml.transformNode(xsl),"'","")
'News=replace(News,"</br>","")
Response.Write(startTable&newsName&startTableEnd&News&endTable)
set xml = nothing
set xsl = nothing
%>
here is the template
<?xml version='1.0'?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/TR/WD-xsl"
xmlns="http://www.w3.org/TR/REC-html40"
result-ns="">
<xsl:for-each select="DATA/EXCHANGE/STOCK">
<tr>
<td>
<table>
<tr>
<td colspan="12">
<font face="arial" size="1">
<b>
<xsl:value-of select="@Code"/>
</xsl:attribute>
<xsl:value-of />
</b>
</font>
</td>
</tr>
<xsl:for-each select="DATA/EXCHANGE/STOCK">
<tr>
<td valign="top">
-
</td>
<td>
<font face="arial" size="1">
<A>
<xsl:attribute name="Code">
<xsl:value-of select="@Code"/>
</xsl:attribute>
<xsl:value-of />
</A>
</font>
</td>
</tr>
</xsl:for-each>
</table>
</td>
</tr> (etc)
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
thanks in advance
andy