Element m = parent.addElement(MailService.E_APPOINTMENT);
Element apptElt = parent.addElement(MailService.E_APPOINTMENT);
    public static Element encodeApptSummary(Element parent, ZimbraContext lc, Appointment appt, int fields) {        Element m = parent.addElement(MailService.E_APPOINTMENT);                m.addAttribute(MailService.A_UID, appt.getUid());        m.addAttribute(MailService.A_ID, lc.formatItemId(appt));        m.addAttribute(MailService.A_FOLDER, lc.formatItemId(appt.getMailbox(), appt.getFolderId()));                for (int i = 0; i < appt.numInvites(); i++) {            try {                Invite inv = appt.getInvite(i);                Element ie = m.addElement(MailService.E_INVITE);                ie.addAttribute(MailService.A_ID, lc.formatItemId(appt.getMailbox(), inv.getMailItemId()));                ie.addAttribute(MailService.A_APPT_COMPONENT_NUM, inv.getComponentNum());                if (inv.hasRecurId())                    ie.addAttribute(MailService.A_APPT_RECURRENCE_ID, inv.getRecurId().toString());                ToXML.encodeInvite(ie, lc, appt, inv, NOTIFY_FIELDS);            } catch (ServiceException e) {                e.printStackTrace();            }        }                return m;    }