mirror of
https://github.com/php/php-src.git
synced 2025-08-17 22:48:57 +02:00

domdocument->schemaValidate(string filename) domdocument->schemaValidateSource(string xml) domdocument->relaxNGValidate(string filename) domdocument->relaxNGValidateSource(string xml) also fix domelement->setAttributeNS
11 lines
No EOL
180 B
PHP
11 lines
No EOL
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";
|
|
}
|
|
|
|
?>
|