private final String encodeFieldName(final String pFieldName){
  StringBuilder str=new StringBuilder();
  int fieldNameLength=pFieldName.length();
  char currentChar;
  for (int i=0; i != fieldNameLength; i++) {
    currentChar=pFieldName.charAt(i);
    if (Character.isUpperCase(currentChar)) {
      str.append('-');
      str.append(Character.toLowerCase(currentChar));
    }
 else {
      str.append(currentChar);
    }
  }
  return str.toString();
}

private final String encodeFieldName ( final String pFieldName ) { StringBuilder str = new StringBuilder ( ) ; int fieldNameLength = pFieldName . length ( ) ; char currentChar ; for ( int i = 0 ; i != fieldNameLength ; i ++ ) { currentChar = pFieldName . charAt ( i ) ; if ( Character . isUpperCase ( currentChar ) ) { str . append ( '-' ) ; str . append ( Character . toLowerCase ( currentChar ) ) ; } else { str . append ( currentChar ) ; } } return str . toString ( ) ; }
encodes a field name in java notation ( e . g . myfieldname ) to an xml field name ( e . g . my - field - name ) .
