You have output disabled with CFSETTING?  If so, you'll need to wrap the
CFSAVECONTENT in a CFOUTPUT if you want the text to display.

Cheers,
barneyb

> -----Original Message-----
> From: Dave Carabetta [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 19, 2004 1:56 PM
> To: CF-Talk
> Subject: cfset vs. cfsavecontent
>
> I have a CFC where I'm writing the contents of a config file for a 3rd
> party engine. However, if I use cfsavecontent (my preferred approach),
> the XML string never gets written. But if I use the standard cfset,
> the string is written out appropriately. Can anybody see/tell me the
> difference between the following two snippets and if there's a reason
> why cfsavecontent wouldn't be working? It just returns a blank string:
>
> Using cfset:
> <cfset xmlString = '<?xml version="1.0" encoding="UTF-8"
> standalone="no"?><DYNCONFIG><!-- Overrides the Input file name
> --><ELEMENT><LOCATOR>TOOL(PropertyCSV)/DATA_FILE</LOCATOR><VAL
> UE>X:\\#Variables.instance["CORPORATEID"]#\\#Arguments.fileNam
> e#</VALUE></ELEMENT><!--
> Overrides the Output file name
> --><ELEMENT><LOCATOR>TOOL(PropertyResults)/DATA_FILE</LOCATOR>
> <VALUE>X:\\#Variables.instance["CORPORATEID"]#\\#Arguments.fil
eName#_Geocoded.csv</VALUE></ELEMENT></DYNCONFIG>'
> />
>
> Using cfsavecontent:
> <cfsavecontent variable="xmlString"><?xml version="1.0"
> encoding="UTF-8" standalone="no"?>
> <DYNCONFIG>
>     <!-- Overrides the Input file name -->
>     <ELEMENT>
>         <LOCATOR>TOOL(PropertyCSV)/DATA_FILE</LOCATOR>
>         
> <VALUE>#Variables.instance['CONSTANTS'].get('baseConfigFileMap
> pedDrive')#\\#Variables.instance["CORPORATEID"]#\\#Arguments.f
> ileName#</VALUE>
>     </ELEMENT>
>     <!-- Overrides the Output file name -->
>     <ELEMENT>
>         <LOCATOR>TOOL(PropertyResults)/DATA_FILE</LOCATOR>
>         
> <VALUE>#Variables.instance['CONSTANTS'].get('baseConfigFileMap
> pedDrive')#\\#Variables.instance["CORPORATEID"]#\\#Arguments.f
> ileName#_Geocoded.csv</VALUE>
>     </ELEMENT>
> </DYNCONFIG>
> </cfsavecontent>
>
> Regards,
> Dave.
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to