Export XER to XML - Read Error XML File

Hi,

We export an XER file created in Primavera to XML format. When importing the XML file, only 7 tasks are listed out of which there are 88. In these tasks the information is also read incorrectly. Start date, end date and duration are not retrieved.

Could you please help us by indicating if the problem is in the Aspose library? The version used is 22.10.0.

Below is a ZIP file containing the .XER and .xml files.

EC00515.zip (64.3 KB)

Code:

Project _asposeProject = new Project(FileName);

ChildTasksCollector collector = new ChildTasksCollector();
TaskUtils.Apply(_asposeProject.RootTask, collector, 0);

foreach (Aspose.Tasks.Task task in collector.Tasks)
{
	...
}

Thanks.

@luiscarvalhal,
the sample xml file you’ve provided contains 3 project. You can check it using the following code:


            string fileName = "EC00515.xml";
            PrimaveraXmlReader reader = new PrimaveraXmlReader(fileName);
            foreach (var projectId in reader.GetProjectUids())
            {
                Console.WriteLine(projectId);
            }

the output is
4357
4366
3940.

As the project id is not specified, the first project is loaded. It contains 6 tasks.

The project id can be specified using PrimaveraReadOptions:


Project project = new Project(fileName, new PrimaveraReadOptions()
            {
                ProjectUid = 3940
            });

...