Josh,

The following code is roughly equivalent:

<cfset server.MapPath = "c:\temp">

<cfobject action="create"
    type="COM"
    class=Microsoft.XMLDOM
    NAME="xml">

<cfset xml.async = false>
<cfset xml.load(server.mapPath & "myfile.xml")>

<cfobject action="create"
    type="COM"
    class=Microsoft.XMLDOM
    NAME="xsl">
<cfset xsl.async = false>
<cfset xsl.load(server.mapPath & "myfile.xsl")>

<cfoutput>
 #xml.transformNode(xsl)#
</cfoutput>

Although, not really doing much COM programming, I'm not sure if passing the
'xsl' object reference to the xml.transformNode method will work within CF.
Please try it out and tell us how you go.  

The code assumes that you have the Microsoft.XMLDOM COM library installed on
your machine, this is freely available from microsoft.

Jared Clinton
Software Engineer
Maxi Multimedia
NEC Australia


> -----Original Message-----
> From: JoshMEagle [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 18 June 2001 22:37
> To: CF-Talk
> Subject: XML with ColdFusion
> 
> 
> The following code opens and outputs an XML file based on an 
> XSL template
> using ASP .... I was wondering if there are similar functions 
> in CF or if
> someone could point me in the right direction towards 
> functions or whatnot
> .....
> 
> THANKS!
> 
> ASP Code Listing (sorry, I know y'all hate ASP):
> 
> <%
> 'Load the XML
> set xml = Server.CreateObject("Microsoft.XMLDOM")
> xml.async = false
> xml.load(Server.MapPath("myfile.xml"))
> 
> 'Load the XSL
> set xsl = Server.CreateObject("Microsoft.XMLDOM")
> xsl.async = false
> xsl.load(Server.MapPath("myfile.xsl"))
> 
> Response.Write(xml.transformNode(xsl))
> %>
> 
> Joshua Miller
> Web Development
> Eagle Technologies Group
> Technology Solutions for the Next Generation
> www.eagletgi.com
> [EMAIL PROTECTED] 
> 
> 
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to