Question : Dealing with symbols

I convert a web based form to pdf using Coldufion cfxml tag. I pull information from database which users submitted. The problem is some titles has the & sign; Controller & SVP something like that. Becasue of the & sign, I get an error.:The entity name must immediately follow the '&' in the entity reference. Is there any way it reads the & sign as a string rather than a part of codes?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
<cfxml variable="transfer">
<cfoutput>
<data>
<TransferID>#URL.TransferID#</TransferID>
<EmployeeName1>#getinfo.FirstName# #getinfo.MiddleName# #getinfo.LastName#</EmployeeName1>
... more tags...
</data>
</cfoutput>
</cfxml>
    
<cfpdfform action="populate"
source="print.pdf"
xmlData="#transfer#"/>

Answer : Dealing with symbols

Just change the & into the XML acceptable value of &amp;

Here are the reserved characters you have to change..
"   &quot;
'   &apos;
<   <
>   >
&   &amp;

<cfset cleanFirstName = replace(getinfo.FirstName,"&","&amp;","all")>
Random Solutions  
 
programming4us programming4us