public static function is_valid_preset($xml) {
        $dom = new DOMDocument();
        if (!$dom->loadXML($xml)) {
            return false;
        } else {
            $val = @$dom->schemaValidate(__DIR__.'/../role_schema.xml');
            if (!$val) {
                return false;
            }
        }
        return true;
    }
public static function is_valid_preset($xml) {
        $dom = new DOMDocument();
        if (!$dom->loadXML($xml)) {
            return false;
        } else {
            $val = @$dom->schemaValidate(__DIR__.'/../role_schema.xml');
            if (!$val) {
                return false;
            }
        }
        return true;
    }
public static function is_valid_preset ( $ xml ) { $ dom = new DOMDocument ( ) ; if ( ! $ dom -> loadXML ( $ xml ) ) { return false ; } else { $ val = @ $ dom -> schemaValidate ( __DIR__ . '/../role_schema.xml' ) ; if ( ! $ val ) { return false ; } } return true ; }
Is this XML valid role preset?

@param string $xml
@return bool
Is this XML valid role preset?