Beispiel #1
0
        // Determine if a string is a valid XML name token.
        public static bool IsNameToken(String name)
        {
            int posn;

            if (((Object)name) == null || name.Length == 0)
            {
                return(false);
            }
            for (posn = 0; posn < name.Length; ++posn)
            {
                if (!XmlConvert.IsNameNonStart(name[posn], true))
                {
                    return(false);
                }
            }
            return(true);
        }