note 47162 added to function.dom-domdocument-schemavalidate
| From: | gem at rellim dot com | Date: | Thu, 04 Nov 2004 21:44:29 +0000 |
| Subject: | note 47162 added to function.dom-domdocument-schemavalidate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-79644@lists.php.net to get a copy of this message | ||
The method schemaValidate() returns TRUE on success or FALSE if a problem is detected.
Generates PHP WARNINGs if the schema is invalid.
Does not generate WARNINGs if the xml is invalid.
<?php
$xml = new DOMDocument();
$xml->load( 'my.xml' );
if ( $xml->schemaValidate( "my.xsd' ) ) {
echo "Validated OK";
} else {
echo "Validate FAILED";
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.dom-domdocument-schemavalidate.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+47162
Delete -- http://master.php.net/manage/user-notes.php?action=delete+47162&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47162&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47162&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47162&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47162&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47162&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+47162&report=yes
Search -- http://master.php.net/manage/user-notes.php