<!--- Build the XML into a ColdFusion XML document. ---> <cfxml variable="xmlGirl"> <person type="girl"> <head> <eyes value="brown" /> <hair value="brown" /> </head> <torso> <bust value="34A" /> <navel value="pierced" /> </torso> <legs> <waist value="24" /> <hips value="36" /> <calves value="22" /> </legs> </person> </cfxml> <!--- Convert XML to a string. ---> <cfset strGirlXml = Trim( ToString( xmlGirl ) ) /> <!--- Set the length of the content. This will help the browser know when the request is completel. ---> <cfheader name="content-length" value="#Len( strGirlXml )#" /> <!--- Set the XML document type. This will help the AJAX calling program to determine which type of data is being returned (XML, JSON, Script, etc). ---> <cfcontent type="text/xml" variable="#ToBinary( ToBase64( strGirlXml ))#" />