For some reason, when you set DOMDocument's property 'recover' to true, using '@' to mask errors thrown by loadXml() won't work.
Here's my workaround:
function maskErrors() {}
set_error_handler('maskErrors');
$dom->loadXml($xml);
restore_error_handler();
You could also simply do this: error_reporting(0); and then set back error_reporting to its original state.