note 47171 modified in function.dom-domdocument-schemavalidate by didou
| From: | didou@php.net | Date: | Fri, 17 Dec 2004 17:48:10 +0000 |
| Subject: | note 47171 modified in function.dom-domdocument-schemavalidate by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-81931@lists.php.net to get a copy of this message | ||
Generates PHP WARNINGs if the schema is invalid.
Does not generate WARNINGs if the xml is invalid.
Here is a simple usage example:
<?php
$xml = new DOMDocument();
$xml->load( 'my.xml' );
if ( $xml->schemaValidate( "my.xsd' ) ) {
echo "Validated OK";
} else {
echo "Validate FAILED";
}
?>
--was--
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.
Here is a simple usage example:
<?php
$xml = new DOMDocument();
$xml->load( 'my.xml' );
if ( $xml->schemaValidate( "my.xsd' ) ) {
echo "Validated OK";
} else {
echo "Validate FAILED";
}
?>
http://php.net/manual/en/function.dom-domdocument-schemavalidate.php