QName schemaType = null;
if (xPathFragment != null && !xPathFragment.isAttribute() && !xPathFragment.nameIsText) {
marshalRecord.openStartElement(xPathFragment, namespaceResolver);
}
Converter valueConverter = xmlCompositeDirectCollectionMapping.getValueConverter();
while (cp.hasNext(iterator)) {
objectValue = cp.next(iterator, session);
if (null != valueConverter) {
if (valueConverter instanceof XMLConverter) {
objectValue = ((XMLConverter) valueConverter).convertObjectValueToDataValue(objectValue, session, marshalRecord.getMarshaller());
} else {
objectValue = valueConverter.convertObjectValueToDataValue(objectValue, session);
}
}
schemaType = xmlField.getSchemaTypeForValue(objectValue, session);
newValue = marshalRecord.getValueToWrite(schemaType, objectValue, (XMLConversionManager) session.getDatasourcePlatform().getConversionManager());