Introduction
This article provides a brief introduction to the MPXJ library. This library facilitates the manipulation of information in Java and .Net in many formats like Microsoft Project Plan (MPP), Microsoft Project Data (MPD), Microsoft Project Exchange, and many more. This library is based on some data structures modeled on the data described by the MPP file format, that can be read or written to in many file formats. We have many techniques and libraries to access Excel files in Java or .Net, but for Microsoft Project plan files, there are very few options available to access data from this file type. So this library helps to easily access data from this type of file.
Details
MPXJ is written in Java, but by using a library we can use this MPXJ library in .Net and PHP. IKVM.NET provides a DLL file of this MPXJ library so we can easily use this library. IKVM.NET is an implementation of Java for Mono and the Microsoft .NET Framework. It includes the following component:
- A Java Virtual Machine implemented in . NET.
- A .NET implementation of the Java class libraries.
- Tools that enable Java and .NET interoperability.
For more information about IKVM please refer to my article about IKVM.NET.
For PHP applications we can use the PHP/Java Bridge library. This PHP/Java Bridge can be used to expose the complete MPXJ API in PHP.
This library supports the following formats and nearly all versions of these formats.
- MPX
- MPP
- MSPDI
- MPD
- PRIMAVERA
- POWER PROJECT etc.
MPXJ is based on a "neutral" data structure for project data, coupled with a set of format-specific reader and writer classes that understand how to read from and write to the various supported file formats. The library is currently based on a set of structures modeled on the data described by the MPP file format. All manipulation of project data takes place using these data structures, which can be read from or written to the various supported file formats.
MPXJ currently allows project data to be read from eight distinct data sources using the following reader classes.
- net.sf.mpxj.mpp.MPPReader: reads Microsoft Project MPP files
- net.sf.mpxj.mpx.MPXReader: reads Microsoft MPX files
- net.sf.mpxj.mspdi.MSPDIReader: reads Microsoft MSPDI (XML) files
- net.sf.mpxj.mpd.MPDReader: reads Microsoft MPD files
- net.sf.mpxj.planner.PlannerReader: reads Planner (XML) files
- net.sf.mpxj.primavera.PrimaveraDatabaseReader: reads from a Primavera database
- net.sf.mpxj.primavera.PrimaveraPMFileReader: reads Primavera PM XML files
- net.sf.mpxj.primavera.PrimaveraXERFileReader : reads Primavera XER files
A similar arrangement exists for the writer classes.
- net.sf.mpxj.mpx.MPXWriter: writes Microsoft MPX files
- net.sf.mpxj.mspdi.MSPDIWriter: writes Microsoft MSPDI (XML) files
- net.sf.mpxj.planner.PlannerWriter: writes Planner (XML) files
Summary
In this article, I provided an overview of the MPXJ library, where and for what we can use this library, and all about it. In my next article, I will explain how to use it in various technologies and how to manipulate MPP file data using this library.
If you want to see how to use this library in Java then you can refer to my next article.
References: http://mpxj.sourceforge.net