Habs grad mal wieder gebraucht, und hatte es noch in nem anderen Blog als Draft rumliegen. Darum jetzt einfach mal hier, dann finde ich das selbst auch schnell.
libxml_use_internal_errors(true);
try {
$xml = new SimpleXMLElement($strXML);
} catch (Exception $e) {
throw new Exception("XML ungueltig");
}