Vector nestedRows = (Vector)fieldValue;
if (nestedRows.isEmpty()) {
return getObjectBuilder().createRecord(null);
} else {
// BUG#2667762 if the tag was empty this could be a string of whitespace.
if (!(nestedRows.firstElement() instanceof XMLRecord)) {
return getObjectBuilder().createRecord(null);
}
return (XMLRecord)nestedRows.firstElement();
}
}