Unwanted values coming out

Hello @kashif.iqbal,

Please find attached the mpp file that I am trying to read Mpp fle.zip (130.3 KB)

I am not able to read most outer task

Requirements and Development,
Testing,
Training & Implementation

in the mpp file.

I am reading tasks using project.getRootTask().getChildren(). With this I am getting all tasks from 2nd level.

Module 1
Module 2
Unit Testing… and all 2nd level tasks.

Please suggest a solution so that I can read outer most tasks as well.

Regards
Payal

@payal.pillewar,

We have evaluated the sample MPP file shared by you. We have used the latest version of Aspose.Tasks for Java and able to read the mentioned outer tasks. Following is the sample code snippet and output for your reference.

CODE:

com.aspose.tasks.Project asProject = new com.aspose.tasks.Project("Microsoft-Project-Example.mpp");
System.out.println(" Page Count: " + asProject.getPageCount());

com.aspose.tasks.TaskCollection allTasks = asProject.getRootTask().getChildren();

for (com.aspose.tasks.Task objTask : allTasks)
{
    System.out.println("GUID: " + objTask.get(com.aspose.tasks.Tsk.GUID));
    System.out.println("Reading Task " + objTask.get(com.aspose.tasks.Tsk.NAME));

}

OUTPUT:

Page Count: 20

GUID: C0F03E1D-1C6E-E711-BE95-00090FFE0001
Reading Task Requirements and Development

GUID: D2F03E1D-1C6E-E711-BE95-00090FFE0001
Reading Task Testing

GUID: EEF03E1D-1C6E-E711-BE95-00090FFE0001
Reading Task Training & Implementation