note 48152 rejected from function.dom-domdocument-schemavalidate by didou
| From: | didou@php.net | Date: | Sat, 30 Dec 2006 03:29:01 +0000 |
| Subject: | note 48152 rejected from function.dom-domdocument-schemavalidate by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-121057@lists.php.net to get a copy of this message | ||
Note Submitter: c_daut_d at earthlink dot net
----
In 5.0.2 for Mac OS X, schemaValidate DOES generate a warning (various differing depending on
what's wrong) if the XML doesn't validate.
Which means that simply checking the return value will not protect you from poorly formed XML files.
You still have to implement error checking (try catch blocks won't help because it's an
error not an exception).
Moreover, what I don't understand is why does it (and other DOM functions such as
DOMDocument->load) generate an error instead of throwing a DOMException.