php-src/ext/dom/examples/shipping.php
Shane Caraveo 87bd7d57c6 Add schema and relaxNG validation support
domdocument->schemaValidate(string filename)
domdocument->schemaValidateSource(string xml)
domdocument->relaxNGValidate(string filename)
domdocument->relaxNGValidateSource(string xml)

also fix domelement->setAttributeNS
2003-10-05 20:45:27 +00:00

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";
}
?>