I tried to use WP_Ajax_Response class to respond Ajax request, but then some data wrap with [CDATA], and found that I just can’t use jQuery .text() to grab the data inside that… here is how i resolved this problem
<?xml ....?> <wp_ajax> ... <supplemental> <url><![CDATA[http://.....]]></url> </supplemental> </wp_ajax>
var xml = $.parseXML(response),
imgURL = $(xml).find('supplemental url').text()
first use jQuery function to parse the response, then use jQuery .text() method to retrieve the data within CDATA.