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 AbstractRecord)) {
return getObjectBuilder().createRecord(null);
}
return (XMLRecord) nestedRows.firstElement();
}
}