code: private void writeAssignments()
     {
        for (ResourceAssignment assignment : m_projectFile.getResourceAssignments())
        {
           Resource resource = assignment.getResource();
           if (resource != null)
           {
              Task task = assignment.getTask();
              if (task != null && task.getUniqueID().intValue() != 0 && !task.getSummary())
              {
                 writeAssignment(assignment);
              }
           }
        }
     }
docs: Writes assignment data to a PM XML file.