public static function checkString($xml, $filename = '')
    {
        $doc = Utilities::stringToDOMDocument($xml, $filename);
        $errors = null;
        $preUseInternalErrors = libxml_use_internal_errors(true);
        try {
            if (!$doc->schemaValidateSource(static::getSchema())) {
                $errors = Utilities::explainLibXmlErrors($filename);
            }
        } catch (Exception $x) {
            libxml_use_internal_errors($preUseInternalErrors);
            libxml_clear_errors();
            throw $x;
        }
        libxml_use_internal_errors($preUseInternalErrors);

        return $errors;
    }