Hey I'm using cold-fusion to take a .XML file and mix it with a .XSL file My code is currently like this - <!--- transform.cfm ---> <cfset MyXmlFile = Expandpath("http://www.celticquicknews.co.uk/rss.xml")> <cffile action="READ" variable="xmlInput" file="#MyXmlFile#"> <cfset MyXmlFile = Expandpath("Stylesheets/celtrss.xsl")> <cffile action="READ" variable="xslInput" file="#MyXmlFile#"> <cfset xmlOutput = XMLTransform(xmlInput, xslInput)> <!--- data is output ---> <cfcontent type="text/html" reset="yes"> <cfoutput>#xmloutput#</cfoutput> <cfinclude template="menu.html"> Code (markup): If I use line 2 as is it does not work. But if I rip the rss.xml of the same site and save it as my own XML file and refer to it directly it works perfectly. Any idea why the internet link to the .XML file won't work?
What does "doesn't work" mean? Do you get an error...? Without knowing more, it looks like you're using both Expandpath() and CFFILE incorrectly. CFFILE reads files on _your_ local server. To read a url of a remote server you need to use CFHTTP. Also, ExpandPath() it is intended for use with a relative path on your server. For example, it can convert the shortcut for root "/" to a physical path like "C:\ColdFusion8\wwwrooot"
Hey CFStarlight I was just getting a blank screen with the original but after your reply I looked up what you said and found how to sort it out. I changed it to <CFHTTP METHOD="GET" URL="http://www.celticquicknews.com/rss.xml"> <CFSET xmlInput = CFHTTP.FileContent> Which works now so thanks for helping me out!