parseerror无效的XML:601

I have this code:

    var ajaxLoader = $('.ajaxLoader', lpWindow);
$.ajaxSetup({
    url: 'http://www.server.foo/setMessage.php',
    type: 'POST',
    data: {
        text: message,
        username: username
    },

    beforeSend: function(){
        ajaxLoader.fadeIn( 'fast' );
    },
    complete: function(){
        ajaxLoader.fadeOut( 'fast' );
    },
    success: function(){
        ajaxLoader.fadeOut( 'fast' );
    },
    error: function(xhr, ajaxOptions, thrownError){
        $('.content', lpWindow).empty().append('Something went wrong...');
        console.log(xhr.status);
        console.log(xhr.statusText);
        console.log(thrownError);

    }
});

$.ajax({
    success: function(){
        getMessages(lpWindow)
    }
});

It works perfect in Google Chrome but it fail in firefox. i get this error messages in firebug.

200 parsererror Invalid XML: 601

What's wrong and how can i solve it?

It looks like the request succeeds but your XML in the response is invalid. Ensure you're sending back valid XML.

EDIT

If you're not actually sending back XML, make sure to set at least one of the following with right data type (the examples below are for JSON):

  • The Content-Type header on the server (header('Content-type: application/json'); for PHP)
  • The dataType parameter for the Ajax request (dataType:'json')