jQuery nested ajax deffereds- looking for improvements
I'm not sure what do you exactly need? 
http://jsfiddle.net/tomalec/GeRkG/1/


Use promise returned by $.post. we don't need var xml_A and $.when(xml_A)
Remove deffereds_b from global scope, and use it as resolved value.


And now improvements depends on what you are trying to achive:


Just get all responses together in right order, after all is done
Do above, but performe partial operations as soon as posible, if so do you really need countA while handling B response?




1: 
http://jsfiddle.net/tomalec/GeRkG/3/
 - Move B response handling outside 
 - Move content to local scopes
 or even: http://jsfiddle.net/tomalec/GeRkG/4/
  - one callback, and object creation less



2:
http://jsfiddle.net/tomalec/rwq2d/2/
 - Move AB response handling outside, we can move A separately if you want to perform it sooner, than later (before B response).
 - Move content to local scopes
 - Removed closure for $.when.apply( null, requests)

function parseContent(content) {
    console.log('content',content);
    $.each(content, function() {
        $('body').append('&lt;br&gt;&lt;br&gt;' + this.a + '&lt;br&gt;' + this.b.join('&lt;br&gt;'));
    })
}
function handleABResponse(returnedXML, $el_A, countA) {
    var name_of_Attribute_of_Element_A = $el_A.attr("name"),
        $el_Bs = $(returnedXML).find("ElementB"),
        results_b = [];
    $el_Bs.each(function(index, el) {
        var name_of_Attribute_of_Element_B = $(el).attr("name");
        results_b.push (countA + ". " + name_of_Attribute_of_Element_B);
    });

    return {
        a: countA + ". " + name_of_Attribute_of_Element_A,
        b: results_b
    }
}
/* Request As */  
$.post("/echo/xml/", {
    xml: a
}).pipe(function(returnedXML) {
    /* process As */
    /* array to store nested ajax promises */
    var requests = [];

    var $el_As = $(returnedXML).find("ElementA");
    $el_As.each(function(countA) {
        var $el_A = $(this);
        /* push B promise to array*/
        requests.push(
            $.post("/echo/xml/", {
                xml: b
            })
            .pipe(function bSuccess (response){
                /* process A and Bs  */
                return handleABResponse(response, $el_A, countA);
            })
        );
    });
    /* return promise for all requests */
    return $.when.apply( null, requests );
}).done(function() { //content[0], content[1],..
    /* collect processed responses */
    console.warn(this,arguments);
    parseContent(arguments);
    $("body").append("&lt;p&gt;All done!&lt;/p&gt;");
});