Dr Winston Umbogo
Well-Known Member
- Joined
- Sep 24, 2005
- Messages
- 1,790
Anybody here know XML?
I'm trying to display some information thats pulled from an XML page, formatted with an XSL sheet and then pulled into a html page using javascript. I'm using javascript instead of php or asp, as I need to reuse the script on both a windows and an apache server.
It works fine locally, but when I upload it to a server, the page is displayed without the XML info and warning that says "error on page".
Here is my XSL:
Here is part of my XML, which is stored on another server:
and here is the javascript that pulls the information into the page:
Any ideas as to what might be the problem here? its making me want to gouge out my eyes with rusty spoons.
cheers
I'm trying to display some information thats pulled from an XML page, formatted with an XSL sheet and then pulled into a html page using javascript. I'm using javascript instead of php or asp, as I need to reuse the script on both a windows and an apache server.
It works fine locally, but when I upload it to a server, the page is displayed without the XML info and warning that says "error on page".
Here is my XSL:
<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0"
xmlns:xsl="<A href="http://www.w3.org/1999/XSL/Transform"><xsl:template">http://www.w3.org/1999/XSL/Transform"><xsl:template match="/">
<html>
<body>
<table border="1">
<tr bgcolor="#B07946">
<th align="left">Name :</th>
<th align="left">Buyin :</th>
<th align="left">Entry Fee :</th>
<th align="left">Currency : </th>
<th align="left">State :</th>
<th align="left">Players :</th>
<th align="left">Blinds :</th>
<th align="left">Type :</th>
<th align="left">Limit :</th>
<th align="left">Start Time :</th>
</tr>
<xsl:for-each select="xmlfeed/tournament">
<tr>
<td><xsl:value-of select="name"/></td>
<td><xsl:value-of select="buyin"/></td>
<td><xsl:value-of select="entryfee"/></td>
<td><xsl:value-of select="currency"/></td>
<td><xsl:value-of select="state"/></td>
<td><xsl:value-of select="players"/></td>
<td><xsl:value-of select="blindstructure"/></td>
<td><xsl:value-of select="type"/></td>
<td><xsl:value-of select="limit"/></td>
<td><xsl:value-of select="starttime"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template></xsl:stylesheet>
Here is part of my XML, which is stored on another server:
<?xml version="1.0" encoding="utf-8" ?>
- <xmlfeed>
- <tournament>
<tid>10022248</tid>
<name>Texas Holdem</name>
<game>Texas Holdem Poker</game>
<buyin>10</buyin>
<entryfee>1</entryfee>
<currency>USD</currency>
<state>Running</state>
<players>89</players>
<blindstructure>Normal NL 1</blindstructure>
<type>Regular</type>
<limit>No Limit</limit>
<starttime>2005-11-18T13:00:00</starttime>
</tournament>
.
.
.
- </xmlfeed>
and here is the javascript that pulls the information into the page:
<script type="text/javascript">// Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
xml.load("<A href="http://serve.bosscasinos.com/poker/pokerTnFeed_dev.asp?productid=3020")//">http://serve.bosscasinos.com/poker/pokerTnFeed_dev.asp?productid=3020")// Load XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load("cdcatalog.xsl")// Transform
document.write(xml.transformNode(xsl))</script>
Any ideas as to what might be the problem here? its making me want to gouge out my eyes with rusty spoons.
cheers