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