public static function validateQtiXml($qti)
    {
        
        $dom = self::loadQtiXml($qti);
        $returnValue = $dom->saveXML();

        $parserValidator = new Parser($returnValue);
        $parserValidator->validate();
        if(!$parserValidator->isValid()) {
            common_Logger::w('Invalid QTI output: ' . PHP_EOL . ' ' . $parserValidator->displayErrors());
            throw new QtiModelException('invalid QTI item XML ' . PHP_EOL . ' ' . $parserValidator->displayErrors());
        }
    }
public static function validateQtiXml($qti)
    {
        
        $dom = self::loadQtiXml($qti);
        $returnValue = $dom->saveXML();

        $parserValidator = new Parser($returnValue);
        $parserValidator->validate();
        if(!$parserValidator->isValid()) {
            common_Logger::w('Invalid QTI output: ' . PHP_EOL . ' ' . $parserValidator->displayErrors());
            throw new QtiModelException('invalid QTI item XML ' . PHP_EOL . ' ' . $parserValidator->displayErrors());
        }
    }
public static function validateQtiXml ( $ qti ) { $ dom = self :: loadQtiXml ( $ qti ) ; $ returnValue = $ dom -> saveXML ( ) ; $ parserValidator = new Parser ( $ returnValue ) ; $ parserValidator -> validate ( ) ; if ( ! $ parserValidator -> isValid ( ) ) { common_Logger :: w ( 'Invalid QTI output: ' . PHP_EOL . ' ' . $ parserValidator -> displayErrors ( ) ) ; throw new QtiModelException ( 'invalid QTI item XML ' . PHP_EOL . ' ' . $ parserValidator -> displayErrors ( ) ) ; } }
Validate a QTI XML string.

@param string $qti File path or XML string
@throws QtiModelException
Validate a QTI XML string .