mpp to xml

Convert MS Project (MPP) to XML using .NET REST API.

In the rapidly evolving landscape of project management and data exchange, the need for converting Microsoft Project (MPP) files to XML has gained significant importance. The capability to seamlessly translate complex project plans and data into XML format has become a critical asset for project managers, data analysts, and software developers. This article delves into the essential need for MPP to XML conversion aiming to improve data interoperability, integrating project data with other applications, or to enhance data analysis capabilities.

.NET REST API for MS Project Files Manipulation

Aspose.Tasks Cloud SDK for .NET is a versatile toolkit that provides a wide range of capabilities for managing project data and files. Its MPP to XML conversion feature is a standout functionality that empowers you to effortlessly transform Microsoft Project files into XML format. By converting MPP files to XML with .NET REST API, you gain the ability to seamlessly share, analyze, and integrate project data with other applications, databases, and systems. Furthermore, this approach also simplifies complex project data into a structured, human-readable format, ensuring data accuracy and consistency.

In order to use the SDK in your project, please search Aspose.Tasks-Cloud in NuGet packages manager and click the Add Package button. This will add the SDK reference in your project. Secondly, obtain your client credentials from cloud dashboard.

In case you do not have an existing account, simply create a free account by following the instructions specified in quick start article.

Convert MPP to XML with C# .NET

Please follow the instructions given below to convert MPP to XML online, which opens up a world of possibilities.

TasksApi tasksApi = new TasksApi(clientSecret, clientID);

Create an object of TasksApi class while passing client credentials as input arguments.

GetTaskDocumentWithFormatRequest formatRequest = new GetTaskDocumentWithFormatRequest()
    Format = ProjectFileFormat.Xml,
    Name = inputFile,
    ReturnAsZipArchive = false

Create a Request instance where we specify the name of input MPP, resultant format and a parameter specifying if the output can be ZIP archived or not.

var output = tasksApi.GetTaskDocumentWithFormat(formatRequest);

Finally, call the API to convert MPP to XML online and return the output in stream instance.

saveToDisk(finalResponse, resultant);

Our custom method providing the capability to save the resultant XML on local storage.

mpp to xml

Preview of MPP to XML conversion using .NET REST API.

The sample MPP file used in the above example can be downloaded from Home move plan.mpp.

Save MPP to XML using cURL Commands

The MPP to XML conversion using Aspose.Tasks Cloud and cURL commands brings simplicity and efficiency to the process. The use of cURL commands further streamlines the conversion process, allowing you to seamlessly integrate this feature into your applications or workflows. This approach empowers you to automate the MPP to XML conversion, making it a practical choice for those looking to handle large volumes of project data efficiently.

The first step in this approach is to generate a JWT access token using the following command:

curl -v "" \
 -X POST \
 -d "grant_type=client_credentials&client_id=163c02a1-fcaa-4f79-be54-33012487e783&client_secret=c71cfe618cc6c0944f8f96bdef9813ac" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Accept: application/json"

Once we have the JWT token, please execute the following command to export MS Project (MPP) file to Excel worksheet.

curl -X GET "{sourceMPP}/format?format=xml&returnAsZipArchive=false" \
-H  "accept: multipart/form-data" \
-H  "authorization: Bearer <JWT Token>" \
-o Resultant.xml

Replace sourceMPP with the name of input MPP file available in Cloud storage and, replace JWT Token with JWT access token generated above.


In conclusion, whether you choose to convert MPP to XML using Aspose.Tasks Cloud with its robust .NET SDK or opt for the streamlined approach of cURL commands, you’re equipped to meet your MPP to XML conversion needs effectively. So whatever you choose, the versatility of Aspose.Tasks Cloud ensures that you can tailor your approach to suit your specific requirements, unlocking the potential for seamless MPP to XML conversion in your projects.

We highly recommend visiting the following blogs: