Hi, I'm pretty new to using xml with asp, although I understand the basics. I need to connect to a feed that holds data on concert tickets that are on sale and use it on our own site.
I can pull all of the xml and format it OK with xsl but because there is so much data the page takes a while loading and would overall be better if I could page through the data maybe 20 records at a time. I've been looking for days to find a decent example of doing this with classic ASP but nothing has turned up that answers all my problems.
My page is coded like this:
<%
dim objHTTP , objXML , objXSL
set objHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objHTTP.open "GET", " false
objHTTP.send
set objXML = objHTTP.responseXML
set objXSL=Server.CreateObject("microsoft.xmldom")
objXSL.async=false
objXSL.load(Server.MapPath("style.xsl"))
if (objXSL.parseError.errorCode = 0) then
Response.Write(objXML.transformnode(objXSL))
else
Response.Write "Error: " & objXSL.parseError.reason & "<br> URL:" & objXSL.url
end if
Set objHTTP = Nothing
Set objXML = Nothing
Set objXSL = Nothing
%>
And my xsl is this:
<xsl:stylesheet xmlns:xsl=" <xsl:template match="/">
<HTML>
<HEAD>
<TITLE>Ticketmaster</TITLE>
</HEAD>
<BODY BGCOLOR="ffffff">
<DIV ALIGN="center">
<TABLE BGCOLOR="ffffff" BORDER="0" CELLPADDING="4" CELLSPACING="0" WIDTH="100%">
<xsl:for-each select="eventList/event">
<TR VALIGN="middle">
<TD ALIGN="left" BGCOLOR="ffffff">
<B><A>
<xsl:attribute name="HREF">
<xsl:value-of select="@uri"/>
</xsl:attribute>
<xsl:attribute name="TARGET">_blank</xsl:attribute>
<FONT FACE="Verdana, Arial,Helvetica, sans-serif" SIZE="-1" COLOR="000000">
<xsl:value-of select="primaryAct"/></FONT>
</A></B>
<BR/>
<FONT FACE="Verdana, Arial,Helvetica, sans-serif" SIZE="-2" COLOR="666666">
<xsl:value-of select="venue"/>
</FONT>
<BR/>
<FONT FACE="Verdana, Arial,Helvetica, sans-serif" SIZE="-2" COLOR="666666">
<xsl:for-each select="primaryAct">
<xsl:value-of select="@date"/>
</xsl:for-each>
<xsl:for-each select="venue">
, <xsl:value-of select="@city"/>
</xsl:for-each>
</FONT>
</TD>
</TR>
</xsl:for-each>
</TABLE>
</DIV>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
Any help would be greatly appreciated.
I can pull all of the xml and format it OK with xsl but because there is so much data the page takes a while loading and would overall be better if I could page through the data maybe 20 records at a time. I've been looking for days to find a decent example of doing this with classic ASP but nothing has turned up that answers all my problems.
My page is coded like this:
<%
dim objHTTP , objXML , objXSL
set objHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objHTTP.open "GET", " false
objHTTP.send
set objXML = objHTTP.responseXML
set objXSL=Server.CreateObject("microsoft.xmldom")
objXSL.async=false
objXSL.load(Server.MapPath("style.xsl"))
if (objXSL.parseError.errorCode = 0) then
Response.Write(objXML.transformnode(objXSL))
else
Response.Write "Error: " & objXSL.parseError.reason & "<br> URL:" & objXSL.url
end if
Set objHTTP = Nothing
Set objXML = Nothing
Set objXSL = Nothing
%>
And my xsl is this:
<xsl:stylesheet xmlns:xsl=" <xsl:template match="/">
<HTML>
<HEAD>
<TITLE>Ticketmaster</TITLE>
</HEAD>
<BODY BGCOLOR="ffffff">
<DIV ALIGN="center">
<TABLE BGCOLOR="ffffff" BORDER="0" CELLPADDING="4" CELLSPACING="0" WIDTH="100%">
<xsl:for-each select="eventList/event">
<TR VALIGN="middle">
<TD ALIGN="left" BGCOLOR="ffffff">
<B><A>
<xsl:attribute name="HREF">
<xsl:value-of select="@uri"/>
</xsl:attribute>
<xsl:attribute name="TARGET">_blank</xsl:attribute>
<FONT FACE="Verdana, Arial,Helvetica, sans-serif" SIZE="-1" COLOR="000000">
<xsl:value-of select="primaryAct"/></FONT>
</A></B>
<BR/>
<FONT FACE="Verdana, Arial,Helvetica, sans-serif" SIZE="-2" COLOR="666666">
<xsl:value-of select="venue"/>
</FONT>
<BR/>
<FONT FACE="Verdana, Arial,Helvetica, sans-serif" SIZE="-2" COLOR="666666">
<xsl:for-each select="primaryAct">
<xsl:value-of select="@date"/>
</xsl:for-each>
<xsl:for-each select="venue">
, <xsl:value-of select="@city"/>
</xsl:for-each>
</FONT>
</TD>
</TR>
</xsl:for-each>
</TABLE>
</DIV>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
Any help would be greatly appreciated.