note 45880 deleted from function.dom-domdocument-validate by tomsommer
| From: | tomsommer@php.net | Date: | Wed, 22 Sep 2004 19:30:07 +0000 |
| Subject: | note 45880 deleted from function.dom-domdocument-validate by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-77184@lists.php.net to get a copy of this message | ||
Note Submitter: stedis at antartide dot org
----
We do not need to validate XML stream against a DTD
as argument in validate() method.
If we call a $dom->validate() on a DomDocument we
assume that the XML stream contains something like:
<!DOCTYPE mystuff SYSTEM "http://nowhere.not/mystuff.dtd">
so that the validation can be successfully completed.
If we call validate() AND <!DOCTYPE ...> is missing an
exception will throw and validate() will return false.
Otherwise validate() will run against the dtd and will return
false if the XML strema won't be well-formed.
Regards,
StediS