I'm planning to write an tool which would import dbml file and spit out an MDL file for migration purposes and such. To do this, I obviously have to read this dbml file into some kind of semantic model to do transformations.
I tried to use XmlMappingSource, but first it failed because it expects the XML namespace of a file to be http://schemas.microsoft.com/linqtosql/mapping/2007, whereas I had http://schemas.microsoft.com/linqtosql/dbml/2007. After I changed the namespace to read .../mapping/2007, XmlMappingSource started to complain about all kinds of unrecognized attributes.
Is there any object model to represent the structure of a dbml file?