Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to display cursortoxml() in ASP?
Message
From
20/12/2001 16:04:14
 
 
To
20/12/2001 14:31:03
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00596930
Message ID:
00597000
Views:
19
>Hi,
>I have a VFP 7 COM Server that passes an XML string created with cursortoxml() back to an ASP page. I would like to display the XML string in an HTML table from my ASP page. How do I use XSL and/or CSS to do this? A small code snippet would be appreciated.
>Thanks,
>John

This is simple xsl that creates an HTML table:
<?xml version="1.0"?>
<xsl:template xmlns:xsl="http://www.w3.org/TR/WD-xsl">
	<TABLE BORDER="1" CELLSPACING="2" >
	<TR>
	<TH><B>Part</B></TH>
	<TH><B>Description</B></TH>
	<TH><B>Issued</B></TH>
	</TR>
	<xsl:for-each select="ORDERS/row" order-by="issued">
		<TR>
		<TD><xsl:value-of select="part"/></TD>
		<TD><xsl:value-of select="description"/></TD>
		<TD><xsl:value-of select="issued"/></TD>
		</TR>
	</xsl:for-each>
	</TABLE>
</xsl:template>
In your ASP you do
Response.Write oSrc.TransformNode(oSty)
Where oSrc is an XMLDOM object loaded with the XML and oSty is another object loaded with the above XSL. You can also return the HTML table directly from your COM server which will probably be faster than this. HTH
Previous
Reply
Map
View

Click here to load this message in the networking platform