question: public final String javaNameToXMLName ( final String fieldName ) { StringBuilder str = new StringBuilder ( ) ; int fieldNameLength = fieldName . length ( ) ; char currentChar ; for ( int i = 0 ; i != fieldNameLength ; i ++ ) { currentChar = fieldName . charAt ( i ) ; if ( Character . isUpperCase ( currentChar ) ) { str . append ( '-' ) ; str . append ( Character . toLowerCase ( currentChar ) ) ; } else { str . append ( currentChar ) ; } } return str . toString ( ) ; }
target:  Encodes a field name in Java notation (e.g. myFieldName) to an XML field name (e.g. my-field-name).