public static function validateNodeName($node)
    {
        if (empty($node)
            || is_numeric(substr($node, 0, 1))
            || substr(strtolower($node), 0, 3) === 'xml'
            || strstr($node, ' ')) {
            return false;
        }

        return true;
    }
public static function validateNodeName($node)
    {
        if (empty($node)
            || is_numeric(substr($node, 0, 1))
            || substr(strtolower($node), 0, 3) === 'xml'
            || strstr($node, ' ')) {
            return false;
        }

        return true;
    }
public static function validateNodeName ( $ node ) { if ( empty ( $ node ) || is_numeric ( substr ( $ node , 0 , 1 ) ) || substr ( strtolower ( $ node ) , 0 , 3 ) === 'xml' || strstr ( $ node , ' ' ) ) { return false ; } return true ; }
Checks if strings is valid as XML node name.


@param string $node Node name

@return bool True if string can be used as node name, otherwise false.
Checks if strings is valid as XML node name .