Sometimes it is desireable to modify the xml
serialization process with XmlAttributeOverrides, for
example, if the base class contains undesireable
attributes. This could be made with an interface:
interface IXmlAttributeOverrides
{
XmlAttributeOverrides GetOverrides();
}
One could implement this interface in his
serializable class, and then return the modifications
which get injected into the constructor of the
XmlSerializer:
View\XmlSerializingView.cs:48
XmlSerializer ser = new XmlSerializer
(model.GetType(), xmlOverrides.GetOverrides());
Regards, Alexander Gräf
Logged In: YES
user_id=1030440
I implemented it the following way (see attached file)
XmlSerializingView.cs modified source