for (int i = fileDataNodes.size() - 1; i >= 0; i--) {
fileDataNodes.get(i).getParentNode().removeChild(fileDataNodes.get(i));
}
// Now create a CD record for the file data
CDResourceFile record = CDResourceFile.fromFileData(fileData, "");
byte[] reconData = record.getBytes();
// Write out the first chunk
int firstChunk = reconData.length > 20544 ? 20544 : reconData.length;
String firstChunkData = printBase64Binary(Arrays.copyOfRange(reconData, 0, firstChunk));
XMLNode documentNode = getDxl().selectSingleNode("//note");