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><VALUE>X:\\#Variables.instance["CORPORATEID"]#\\#Arguments.fileName#</VALUE></ELEMENT><!--
Overrides the Output file name
--><ELEMENT><LOCATOR>TOOL(PropertyResults)/DATA_FILE</LOCATOR><VALUE>X:\\#Variables.instance["CORPORATEID"]#\\#Arguments.fileName#_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('baseConfigFileMappedDrive')#\\#Variables.instance["CORPORATEID"]#\\#Arguments.fileName#</VALUE>
    </ELEMENT>
    <!-- Overrides the Output file name -->
    <ELEMENT>
        <LOCATOR>TOOL(PropertyResults)/DATA_FILE</LOCATOR>
        <VALUE>#Variables.instance['CONSTANTS'].get('baseConfigFileMappedDrive')#\\#Variables.instance["CORPORATEID"]#\\#Arguments.fileName#_Geocoded.csv</VALUE>
    </ELEMENT>
</DYNCONFIG>
</cfsavecontent>

Regards,
Dave.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to