I have a hierarchy of classes that are serialised to XML using XMLSerialiser
. To do this I am declaring all the concrete types with [XmlInclude]
. eg.
[XmlInclude(typeof(Derived))]
public class Base
{
}
public class Derived : Base
{
}
An instance of Derived gets serialised as:
<Base xsi:type="Derived" />
Is there any way change the type text to something other than the class name? eg:
<Base xsi:type="Fred" />