final protected function isElementNameValid(string $name): bool
    {
        return $name &&
            false === strpos($name, ' ') &&
            preg_match('#^[\pL_][\pL0-9._:-]*$#ui', $name);
    }
final protected function isElementNameValid(string $name): bool
    {
        return $name &&
            false === strpos($name, ' ') &&
            preg_match('#^[\pL_][\pL0-9._:-]*$#ui', $name);
    }
final protected function isElementNameValid ( string $ name ) : bool { return $ name && false === strpos ( $ name , ' ' ) && preg_match ( '#^[\pL_][\pL0-9._:-]*$#ui' , $ name ) ; }
Checks the name is a valid xml element name.
Checks the name is a valid xml element name .