DOMExceptions not thrown when I expect them to

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

When I execute the folowing in PHP5

 $xml = <<<XML
 <test>Dit is een test<test>
 $dom = new DomDocument();
 try { 
  $dom->loadXML( $xml );
 } catch( DOMException $e ) { 
  print $e; 

I only get error messages, no DOMExceptions.  The documentation of the DOM
package on Zend says:
The API of the module follows the DOM Level 2 standard as closely as
possible. Consequently, the API is fully object-oriented. It is a good idea
to have the DOM standard available when using this module.

Followed by a list of possible DOMExceptions and their codes.

My question is, how can I detect XML errors in the document loaded by
$dom->load() without using the PHP error reporting ( set_error_handler(),
set_error_level(), trigger_error()... )

Thanks in advance
Rutger Claes                                        rutger.claes@tiscali.tld
Replace tld with top level domain of belgium to contact me    pgp:0x3B7D6BD6
In the next world, you're on your own.

Site Timeline