Serialize compound documents