PHP 5.0 has a not so perfect implementation for throwing XML Parse Error messages. It just uses the standard PHP error system, which makes it not that easy to catch (and display nicer warnings) within a PHP script. But as you can set your own error handler in PHP, there's a not-so-nice, but not too complicated solution to this. In my new wiki
article Catching XML Error Messages With PHP 5.0, I show how to do this (with using exceptions..). The XML error system will most certainly be overhauled in PHP 5.1 with a much nicer way to catch those messages, there's light at the end of the tunnel for people
really missing this ;)