Remove duplicate code for creating NSFetchRequest XML elements