> <CFSET Data = "&lt;" & "?xml version=" & "&quot;" & "1.0" & "&quot;" & "
> encoding=" & "&quot;" & "utf-8" & "&quot;" & " ?" & "&gt;">
>
> When I display this on the page <CFOUTPUT>#Data#</CFOUTPUT> it looks fine,
> but when I use it in the OUTPUT="#Data#" in <CFFILE> it puts &lt;?xml
> version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;  in the file.

I think what you want to do is :

<cfset data='<?xml version="1.0" encoding="utf-8" ?>' >

To display it in the browser

#HTMLCodeFormat(data)#

write it to a file

<cffile output="#data">

I thnk you are mixing up HTML escaped charactors with using chr(*) etc,

try these

 <cfset mylt = chr(60)>
  <cfset mygt = chr(62)>
  <cfset myquot = chr(34)>

and rewrite your code

  <CFSET Data =  "#mylt#?xml version=#myquot#1.0#myquot#
encoding=#myquot#utf-8#myquot# ?#mygt#">


~Justin MacCarthy

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to