My bad, you need to throw a <cfoutput> in there around your <img> tags, or use <cfoutput query> instead of <cfloop query>. Then you'll be all set.
-- Josh ----- Original Message ----- From: <[EMAIL PROTECTED]> To: "CF-Talk" <cf-talk@houseoffusion.com> Sent: Monday, December 11, 2006 12:33 PM Subject: Re: CFFILE: Create/Write dynamically xml file > Thanks guys ... almst there ... > > I did ... > > <CFXML variable="gallery"> > <gallery> > <album title="Babies of the week" description="Babies of the week" > lgPath="/gallery/babyimages1/large/"> > <CFloop query="ANY_APPROVED"> > <img src="#bwk_image#" /> > </CFLOOP> > </album> > </gallery> > </CFXML> > > <cffile action = "write" file = "#BWK_XML_PATH#images.xml" output = > "#gallery#"> > > and the file output was ... > > > <?xml version="1.0" encoding="UTF-8"?> > <gallery> > <album description="Babies of the week" > lgPath="/gallery/babyimages1/large/" title="Babies of the week"> > > <img src="#bwk_image#"/> > > <img src="#bwk_image#"/> > > </album> > </gallery> > > THE #bwk_image# VARIABLE ISN'T PARSING. HOW COME? > > THANKS > d > > >> <cffile >> action = "write" >> file = "#BWK_XML_PATH#images.xml" >> output = " >> <?xml version="1.0" encoding="UTF-8"?> >> <gallery> >> <album title="Babies of the week" description="Babies of the week" >> lgPath="/gallery/babyimages1/large/"> >> <CFOUTPUT query="ANY_APPROVED"> >> <img src="#bwk_image#" /> >> </CFOUTPUT> >> </album> >> </gallery> >> "> >> >> >> Your main problem is all the quotes, the cffile tag can't figure out >> where the output parameter starts and stops. You either need to >> escape all those quotes, mix them so that you use single quotes inside >> the output parameter and double around it or vice a versa, or my >> preference, create the variable before the cffile with <cfsavecontent... >> > >> >> <cfsavecontent variable="xmlToOutput"> >> <?xml version="1.0" encoding="UTF-8"?> >> <gallery> >> <album title="Babies of the week" description="Babies of the week" >> lgPath="/gallery/babyimages1/large/"> >> <CFOUTPUT query="ANY_APPROVED"> >> <img src="#bwk_image#" /> >> </CFOUTPUT> >> </album> >> </gallery> >> </cfsavecontent> >> >> <cffile >> action = "write" >> file = "#BWK_XML_PATH#images.xml" >> output = "#xmlToOutput#"> >> >> >> -------------- >> Ian Skinner >> Web Programmer >> BloodSource >> www.BloodSource.org >> Sacramento, CA >> >> --------- >> | 1 | | >> --------- Binary Soduko >> | | | >> --------- > >> >> "C code. C code run. Run code run. Please!" >> - Cynthia Dunning >> >> Confidentiality Notice: This message including any >> attachments is for the sole use of the intended >> recipient(s) and may contain confidential and privileged >> information. Any unauthorized review, use, disclosure or >> distribution is prohibited. If you are not the >> intended recipient, please contact the sender and >> delete any copies of this message. >> >> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263644 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4