views:

93

answers:

0

I have some class definitions which are somewhat subject to change and which are generated by a third-party tool (xsd, supplied with Visual Studio). For example, suppose it's something like this:

public class THIRD_PARTY_Fruit {
  public string Name { get; set; }
}

public class THIRD_PARTY_Apple : THIRD_PARTY_Fruit {
  public int Calories { get; set; }
  public string Cultivar { get; set; }
}

// ...

The classes often have cumbersome names like above because the schema is a third-party schema outside our control. That's really annoying for developing tests and code against these classes. I'd like to develop an interface that provides a nice wrapper around the generated XSD.exe code.

However, I'm wondering if I'm going about this the wrong way. Would it be better to ditch XSD.exe entirely and instead write the wrappers directly against the schema, mapping them in an ORM-like way? Are there libraries that are essentially "ORM for XML"?