On 10/11/05, Michael Dinowitz <[EMAIL PROTECTED]> wrote: > In running through a shopping cart codebase (cartweaver), I decided to change > a chunk of 40 or so CFSET operations into a single CFSAVECONTENT block. As > this was for building an XML packet, it looked logical to me. No real savings > in code size but to me it just looked cleaner and looked like 'less' > operations. > > Question: What is your preference in such situations. Multiple CFSETs with > each adding a new line of XML to the variable or a block of CFSAVECONTENT > with the entire block wrapped in a CFOUTPUT? >
I think it depends. What versions of ColdFusion is the codebase expected to work with (I've not looked at cartweaver before)? cfsavecontent wasn't around pre-MX (natively, at least, as I know that it was initially a published custom tag). If the requirement involves pre-MX versions, then cfset is the most backward-compatible. If it's MX (any version), then I would actually likely use the cfxml tag, as that's what it's there for. Regards, Dave. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220665 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

