public static String fixDOMElementName ( String string ) { for ( int i = 0 ; i < string . length ( ) ; i ++ ) { if ( ! Character . isJavaIdentifierPart ( string . charAt ( i ) ) ) string = string . substring ( 0 , i ) + "." + string . substring ( i + 1 ) ; } return string ; }
Fix this string so it can be a DOM element name .