Catching PHP errors if XML file is empty
===

so I'm grabbing some information from an XML file like so:

    $url = "http://myurl.blah";
    $xml = simplexml_load_file($url);

Except sometimes the XML file is empty and I need the code to fail gracefully but I can't seem to figure out how to catch the PHP error. I tried this:

    if(isset(simplexml_load_file($url)));
    {
        $xml = simplexml_load_file($url);
        /*rest of code using $xml*/
    }
    else {
        echo "No info avilable.";
    }

But it doesn't work. I guess you can't use ISSET that way. Anyone know how to catch the error?
