public static boolean isValidName(String name){
  if (name == null || name.length() == 0)   return false;
  CharacterIterator iter=new StringCharacterIterator(name);
  char c=iter.first();
  if (!isValidNameStart(c))   return false;
  while (c != CharacterIterator.DONE) {
    if (!isValidName(c))     return false;
    c=iter.next();
  }
  return true;
}

public static boolean isValidName ( String name ) { if ( name == null || name . length ( ) == 0 ) return false ; CharacterIterator iter = new StringCharacterIterator ( name ) ; char c = iter . first ( ) ; if ( ! isValidNameStart ( c ) ) return false ; while ( c != CharacterIterator . DONE ) { if ( ! isValidName ( c ) ) return false ; c = iter . next ( ) ; } return true ; }
determine if the supplied name is a valid xml name .
