I am trying to read data from an MS Project XML file. I have used the XML Schema Tool to generate a set of strongly typed classes based on the Microsoft Project 2007 XML Schema.
However, I ran into several issues. The xmlns property on the root node from the XML exported from MS Project does not match the XSD schema.
MS Project generates this XML:
<Project xmlns="http://schemas.microsoft.com/project">
Should be:
<Project xmlns="http://schemas.microsoft.com/project/2007">
If I try to deserialize with the incorrect xmlns it throws an exception:
<Project xmlns='http://schemas.microsoft.com/project'> was not expected.
If I fix the xmlns it throws the exception:
Instance validation error: '0' is not a valid value for ProjectTaskFixedCostAccrual.
So it appears that either the XML Schema Utility did not correctly generate the classes, or the Microsoft Project 2007 XML Schema is incorrect.
My question is, has anybody encountered this situation before? Are there better alternatives to parsing MS Project XML (besides interop)?