php-src/ext/dom/examples/relaxNG.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
179 B
PHP

<?php
$dom = new domDocument;
$dom->load('relaxNG.xml');
if (!$dom->relaxNGValidate('relaxNG.rng')) {
print "Document is not valid";
} else {
print "Document is valid";
}
?>