code: private void populateRecurringException(ProjectCalendarException mpxjException, Exceptions.Exception xmlException)
     {
        RecurringData data = mpxjException.getRecurring();
        xmlException.setEnteredByOccurrences(Boolean.TRUE);
        xmlException.setOccurrences(NumberHelper.getBigInteger(data.getOccurrences()));
  
        switch (data.getRecurrenceType())
        {
           case DAILY:
           {
              xmlException.setType(BigInteger.valueOf(7));
              xmlException.setPeriod(NumberHelper.getBigInteger(data.getFrequency()));
              break;
           }
  
           case WEEKLY:
           {
              xmlException.setType(BigInteger.valueOf(6));
              xmlException.setPeriod(NumberHelper.getBigInteger(data.getFrequency()));
              xmlException.setDaysOfWeek(getDaysOfTheWeek(data));
              break;
           }
  
           case MONTHLY:
           {
              xmlException.setPeriod(NumberHelper.getBigInteger(data.getFrequency()));
              if (data.getRelative())
              {
                 xmlException.setType(BigInteger.valueOf(5));
                 xmlException.setMonthItem(BigInteger.valueOf(data.getDayOfWeek().getValue() + 2));
                 xmlException.setMonthPosition(BigInteger.valueOf(NumberHelper.getInt(data.getDayNumber()) - 1));
              }
              else
              {
                 xmlException.setType(BigInteger.valueOf(4));
                 xmlException.setMonthDay(NumberHelper.getBigInteger(data.getDayNumber()));
              }
              break;
           }
  
           case YEARLY:
           {
              xmlException.setMonth(BigInteger.valueOf(NumberHelper.getInt(data.getMonthNumber()) - 1));
              if (data.getRelative())
              {
                 xmlException.setType(BigInteger.valueOf(3));
                 xmlException.setMonthItem(BigInteger.valueOf(data.getDayOfWeek().getValue() + 2));
                 xmlException.setMonthPosition(BigInteger.valueOf(NumberHelper.getInt(data.getDayNumber()) - 1));
              }
              else
              {
                 xmlException.setType(BigInteger.valueOf(2));
                 xmlException.setMonthDay(NumberHelper.getBigInteger(data.getDayNumber()));
              }
           }
        }
     }
docs: Writes the details of a recurring exception.
  
  @param mpxjException source MPXJ calendar exception
  @param xmlException target MSPDI exception