How do I perform an XSLT transform?

Here's a simple example of transforming an XML file using an XSLT stylesheet that are both located in the same directory as the running ColdFusion script:

<cfset xmldoc = xmlParse(expandPath("input.xml"))>
<cffile action="read" file="#expandPath('transform.xsl')#" variable="xmltrans">
<cfoutput>#xmlTransform(xmldoc, xmltrans)#</cfoutput>

This question was written by Bif
It was last updated on June 13, 2006.

Categories

XML

Comments

comments powered by Disqus