Sending XML:
(1) Use the CFXML tag - see the documentation; or
(2) Use the CFCONTENT tag. You can set the mime type to
"text/xml" using like this: <cfcontent type="text/xml">...
If you use the CFXML tag, you don't use the XML header line;
CF creates it for you. If you use the CFCONTENT tag. provide your
own XML header line immediately after the CFCONTENT tag.
Receiving XML:
On the JavaScript side, you access the incoming XML object
using the responseXML property - it's an OBJECT, so responseText
won't work in most browsers.
Here's a snippet on how to read the XML using Javascript.
"Obj" is the incoming XML object: