adoSchema::SchemaStringVersion PHP Method

SchemaStringVersion() public method

Call this method to obtain the AXMLS DTD version of the provided XML schema string.
See also: SchemaFileVersion()
public SchemaStringVersion ( string $xmlstring ) : string
$xmlstring string XML schema string
return string Schema version number or FALSE on error
    function SchemaStringVersion($xmlstring)
    {
        if (!is_string($xmlstring) or empty($xmlstring)) {
            return FALSE;
        }
        if (preg_match($this->versionRegex, $xmlstring, $matches)) {
            return !empty($matches[2]) ? $matches[2] : XMLS_DEFAULT_SCHEMA_VERSION;
        }
        return FALSE;
    }