Parameter pElement = jm.addParam(Object.class, "pElement");
JavaQName elementInterface = pController.getClassContext().getXMLInterfaceName();
LocalJavaField element = jm.newJavaField(elementInterface);
element.addLine("(", elementInterface, ") ", pElement);
LocalJavaField chars = jm.newJavaField(String.class);
SimpleContentSG simpleContent = pController.getSimpleContentSG();
Object value = simpleContent.getPropertySG().getValue(element);
chars.addLine(simpleContent.getContentTypeSG().getSimpleTypeSG().getCastToString(jm, value, pData));
jm.addIf(chars, ".length() > 0");
LocalJavaField charArray = jm.newJavaField(char[].class);
charArray.addLine(chars, ".toCharArray()");
jm.addLine(pData, ".getContentHandler().characters(", charArray, ", 0, ", charArray, ".length);");
jm.addEndIf();