Can somebody explain the purpose of this?

I got this code from the XML portfolio tutorial and use it all the time. Works good. But just for my own curiousity why are all the ‘Success’ arguments needed? The function wouldn’ be called until it is properly loaded anyway right? (i.e. onLoad automatically checks this?). And why the second ‘success’ with the if statement. Just trying to understand…

My_xml.onLoad = function(success) {
if (success) {
doSomething(this);
}
}