while(cp.hasNext(iter)) {
Object element = cp.next(iter, session);
// convert the value - if necessary
element = convertObjectValueToDataValue(element, session, ((XMLRecord) row).getMarshaller());
if(element == null) {
XMLNullRepresentationType nullRepresentation = getNullPolicy().getMarshalNullRepresentation();
if(nullRepresentation == XMLNullRepresentationType.XSI_NIL) {
nestedRows.add(XMLRecord.NIL);
} else if(nullRepresentation == XMLNullRepresentationType.EMPTY_NODE) {
Node emptyNode = XPathEngine.getInstance().createUnownedElement(((XMLRecord)row).getDOM(), (XMLField)field);
DOMRecord nestedRow = new DOMRecord(emptyNode);