Instead of creating an object of the feature's eContainingClass (which is a document root and should never sensibly, in XML terms, be used anywhere except as the single root object of a resource) use XMLTypeFactory.eINSTANCE.createAnyType() to create the what's effectively equivalent to a DOM Node. That AnyType instance has a getMixed method into which you can add the content value and it can be added to the getAny() of the target.
boolean shouldSaveType = saveTypeInfo ? xmlTypeInfo.shouldSaveType(eClass, eType, f) : eClass != eType && (eClass != anyType || extendedMetaData == null || eType != EcorePackage.Literals.EOBJECT || extendedMetaData.getFeatureKind(f) == ExtendedMetaData.UNSPECIFIED_FEATURE);
modeltype mpom4 "strict" uses mpom4('http://maven.apache.org/myPOM/4.0.0'); transformation toMPOM4(out pomOUT:mpom4); main() { var docRoot : DocumentRoot := ''.map toPOM(); docRoot.project.properties.addInlineProperty("abc","1.0"); } mapping String::toPOM() : DocumentRoot { project := object Model { properties := object PropertiesType { }; }; };
public class PomResourceImpl extends XMLResourceImpl {
public class PomResourceImpl extends GenericXMLResourceImpl {