Location: PHPKode > projects > WebPA - An Online Peer Assessment System > webpaos_1_0_0_6/library/functions/lib_xml_validate.php
<?php
/**
 * 
 * XML validation functions
 * 
 * @copyright 2007 Loughborough University
 * @license http://www.gnu.org/licenses/gpl.txt
 * @version 0.0.0.2
 * @since 8 Jan 2008
 * 
 */
 
function Validate($xml, $xsd){
 libxml_use_internal_errors(true);

 $objDom = new DOMDocument('1.0', 'utf-8');

 $objDom->loadXML($xml);

 if (!$objDom->schemaValidate($xsd)) {
 
     $allErrors = libxml_get_errors();
  return false;
 } else {
    return true;
 }
} 
?>
Return current item: WebPA - An Online Peer Assessment System