// NOTE: This does not correctly check start name char, but we cannot change it since it would be a breaking change.
internal static void CheckName(String name)
{
int endPos = ValidateNames.ParseNmtoken(name, 0);
if (endPos < name.Length)
{
throw new XmlException(SR.Format(SR.Xml_BadNameChar, XmlExceptionHelper.BuildCharExceptionArgs(name, endPos)));
}
}