How can I convert XML to MPP

Hello, I have an XML file, that needs to be imported as an MPP. Is it possible to convert this XML file to MPP, that opens in MS Project without much hassles.

Thanks

@sreeharibs95,

Thank you for writing to Aspose support team.

The Project class exposes CopyTo method which copies source Project’s contents to a target Project file. Please have a look at the following sample code and let us know your feedback if you need further assistance in this regard.

Sample Code:

Project xmlProject = new Project("Input.xml"); //input xml file

Project mppProject = new Project("Blank Project 2010.mpp"); //template MPP file

xmlProject.CopyTo(mppProject); //copy to MPP template

mppProject.Save("ConvertedXmlToMpp.mpp", SaveFileFormat.MPP); //save as MPP

while saving I am getting the following error com.aspose.tasks.private_.Exceptions.NotSupportedException: The operation is not allowed in evaluation mode. Can you please suggest how to resolve it? Thanks

@pratiksahasunnet,

Please use a valid license to avoid the evaluation message. You can get a 30-day temporary license free of cost to try it at your end.