Parameter paramController = getParamController();
JavaQName elementInterface = ctSG.getClassContext().getXMLInterfaceName();
LocalJavaField element = jm.newJavaField(elementInterface);
element.addLine("(", elementInterface, ") ", paramElement);
LocalJavaField chars = jm.newJavaField(String.class);
SimpleContentSG simpleContent = ctSG.getSimpleContentSG();
Object value = simpleContent.getPropertySG().getValue(element);
chars.addLine(simpleContent.getContentTypeSG().getSimpleTypeSG().getCastToString(jm, value, paramController));
jm.addIf(chars, " != null && ", chars, ".length() > 0");
LocalJavaField charArray = jm.newJavaField(char[].class);
charArray.addLine(chars, ".toCharArray()");
jm.addLine(paramController, ".getTarget().characters(", charArray, ", 0, ", charArray, ".length);");
jm.addEndIf();