XML nerd stuff (1 Viewer)

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:

<?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
 
Could be this:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
The server could be interpreting the "<? ... ?>" as php start/end tags (rather than xml) and trying to parse it as php, which'd give you a parse error

If that's what the problem is, you need to set
Code:
short_open_tag = Off
in php.ini, or in a .htaccess file
 
Anal_Hygiene said:
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.

You know the web server that comes with Windows (the IIS web server) can be configured to work with PHP? The latest PHP installer configures the IIS web server script mappings for you.
 

Users who are viewing this thread

Activity
So far there's no one here
Old Thread: Hello . There have been no replies in this thread for 365 days.
Content in this thread may no longer be relevant.
Perhaps it would be better to start a new thread instead.

Support thumped.com

Support thumped.com and upgrade your account

Upgrade your account now to disable all ads...

Upgrade now

Latest threads

Latest Activity

Loading…
Back
Top