There's no way around it except to store it. Memory paging should reduce potential issues there.
I would suggest instead of using a global variable called 'xml', do something more like this:
var dataStore = (function(){
var xml;
$.ajax({
type: "GET",
url: "test.xml",
dataType: "xml",
success : function(data) {
xml = data;
}
});
return {getXml : function()
{
if (xml) return xml;
// else show some error that it isn't loaded yet;
}};
})();
then access it with:
$(dataStore.getXml()).find('something').attr('somethingElse');