public static function getSchemaVersion($xml)
    {
        $doiXML = new \DOMDocument();
        $doiXML->loadXML($xml);

        $resources = $doiXML->getElementsByTagName('resource');
        $theSchema = 'unknown';
        if ($resources->length > 0) {
            if (isset($resources->item(0)->attributes->item(0)->name)) {
                $theSchema = substr($resources->item(0)->attributes->item(0)->nodeValue,
                    strpos($resources->item(0)->attributes->item(0)->nodeValue,
                        "/meta/kernel") + 5);
            }
        }

        return $theSchema;
    }
public static function getSchemaVersion($xml)
    {
        $doiXML = new \DOMDocument();
        $doiXML->loadXML($xml);

        $resources = $doiXML->getElementsByTagName('resource');
        $theSchema = 'unknown';
        if ($resources->length > 0) {
            if (isset($resources->item(0)->attributes->item(0)->name)) {
                $theSchema = substr($resources->item(0)->attributes->item(0)->nodeValue,
                    strpos($resources->item(0)->attributes->item(0)->nodeValue,
                        "/meta/kernel") + 5);
            }
        }

        return $theSchema;
    }
public static function getSchemaVersion ( $ xml ) { $ doiXML = new \ DOMDocument ( ) ; $ doiXML -> loadXML ( $ xml ) ; $ resources = $ doiXML -> getElementsByTagName ( 'resource' ) ; $ theSchema = 'unknown' ; if ( $ resources -> length > 0 ) { if ( isset ( $ resources -> item ( 0 ) -> attributes -> item ( 0 ) -> name ) ) { $ theSchema = substr ( $ resources -> item ( 0 ) -> attributes -> item ( 0 ) -> nodeValue , strpos ( $ resources -> item ( 0 ) -> attributes -> item ( 0 ) -> nodeValue , "/meta/kernel" ) + 5 ) ; } } return $ theSchema ; }
determines datacite xml schema version xsd

@param $xml
@return string
determines datacite xml schema version xsd