}
// Get the map of the source XML fields
Map oldContextBookmarksMap = oldFields.getBookmarksMap();
// Loop for New ContextFields
for (Iterator iter = newFields.getBookmarks().iterator(); iter.hasNext();) {
RTFContextBookmark newBookmark = (RTFContextBookmark) iter.next();
// Test if oldContextFieldsMap contains this bookmark
RTFContextBookmark oldBookmark = (RTFContextBookmark)oldContextBookmarksMap.get(newBookmark.getType());
if (oldBookmark != null) {
// Update description of Bookmark
newBookmark.setDescription(oldBookmark.getDescription());
}
}
}
}
newFields.toXml(outFileXmlFields);