This brief tutorial explains how to open XER file in Java. You will get details on setting up the IDE, a list of steps, and sample code for developing an XER file viewer in Java. Various API features will be discussed to control the loading of the XER files.
Steps for XER Reader in Java
- Set the environment to use Aspose.Tasks or Java to load an XER file
- Import all the necessary classes and modules from the library
- Load the source XER file into the Project object
- Instantiate the ChildTasksCollector object to gather every task from the project root task recursively
- Iterate through all the tasks in the collection
- Display the desired properties of each task on the console
- Check if the Primavera properties are present for a task and display the Activity ID
The above steps explain how to create an XER viewer in Java. Load the source XER file, collect all the recursive tasks from the root task of the project, and display all the properties in each task. Check the existence of PrimaveraTaskProperties for each task and display all the target properties from it.
Code for XER File Reader in Java
This code demonstrates the development of a Primavera P6 XER viewer in Java. You can use the PrimaveraReadOptions object in the Project class constructor to skip baseline data, which will speed up the loading process, or set the ProjectUid for loading a specific project only if the XER file contains multiple projects.
This guide describes how to develop an XER file reader. To create an MPP file, refer to the article Create MPP file in Java.