String extension = extensionPosition==-1 ? "xml" : fileName.substring(extensionPosition+1).toLowerCase();
if (extension.equals("xml")){
reader=new ImprovedMSPDIReader();
state.setMspdi(true);
} else if (extension.equals("mpp"))
reader=new MPPReader();
else if (extension.equals("mpx"))
reader=new MPXReader();
else if (extension.equals("planner"))
reader = new PlannerReader();
mpxProjectFile = reader.read(in);