ColdFusion thinks the # is the start of a variable name. All you need to do is double it up to escape it:
<cfset MyDoc.rows.XmlChildren[1].XmlChildren[2].XmlText = "##cspan" /> ~Brad ----- Original Message ----- From: "Richard White" <[email protected]> To: "cf-talk" <[email protected]> Sent: Saturday, March 21, 2009 3:24 PM Subject: hash symbol in string > > we are trying to add a string to an xml document as follows: > > <cfset MyDoc.rows.XmlChildren[1].XmlChildren[2].XmlText = "#cspan" /> > > however, the # symbol throws an error. We understand why it is throwing an > error but dont know how to get around it. we need to use just one has > symbol but how do we do it in this case > > thanks for any help > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320794 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

