public static boolean isXMLNamePart ( int codepoint ) { if ( isXMLNameStart ( codepoint ) ) { return true ; } else if ( codepoint >= Character . codePointAt ( "0" , 0 ) && codepoint <= Character . codePointAt ( "9" , 0 ) ) { return true ; } else if ( codepoint == Character . codePointAt ( "-" , 0 ) ) { return true ; } else if ( codepoint == Character . codePointAt ( "." , 0 ) ) { return true ; } else if ( codepoint == 0xB7 ) { return true ; } else if ( codepoint >= 0x0300 && codepoint <= 0x036F ) { return true ; } else if ( codepoint >= 0x203F && codepoint <= 0x2040 ) { return true ; } else { return false ; } }
Determine if the given character is a legal non - starting character for an XML name . Note that although a colon is a legal value its use is strongly discouraged and this method will return false for a colon .