How To: Work with Planner files

Gnome Planner is a popular open source planning tool which writes its own XML-based files.

The sample code below illustrates how to read data from a Planner file.

import net.sf.mpxj.ProjectFile;
import net.sf.mpxj.planner.PlannerReader;

...

PlannerReader reader = new PlannerReader();
ProjectFile projectFile = reader.read(inputFile);

The sample code below illustrates how to write data to a Planner file.

import net.sf.mpxj.ProjectFile;
import net.sf.mpxj.planner.PlannerWriter;

...

PlannerWriter writer = new PlannerWriter();
writer.write(projectFile, outputFileName);