mirror of
https://github.com/php/php-src.git
synced 2024-12-17 05:50:14 +08:00
87bd7d57c6
domdocument->schemaValidate(string filename) domdocument->schemaValidateSource(string xml) domdocument->relaxNGValidate(string filename) domdocument->relaxNGValidateSource(string xml) also fix domelement->setAttributeNS
11 lines
180 B
PHP
11 lines
180 B
PHP
<?php
|
|
|
|
$dom = new domDocument;
|
|
$dom->load('shipping.xml');
|
|
if (!$dom->schemaValidate('shipping.xsd')) {
|
|
print "Document is not valid";
|
|
} else {
|
|
print "Document is valid";
|
|
}
|
|
|
|
?>
|