Ok, im trying to get the xml results from the variable (result) outside the function. When i place the highlighted code into the parseRoster function, it will work correctly, but when I move it outside the function it wont (says undefined). Any help would be appreciated

var result;
var roster;

type: "GET",
url: "http://football33.myfantasyleague.com/2012/export?TYPE=players&L=62072",
dataType: "xml",
success : parseRoster

function parseRoster(xml) {
result = xml;

roster = $(result).find("player[id='0251']").attr("name");