Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to display cursortoxml() in ASP?
Message
De
20/12/2001 16:04:14
 
 
À
20/12/2001 14:31:03
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00596930
Message ID:
00597000
Vues:
20
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform