I have an XSD with the following type defined:
<xs:complexType name="AttributeValue">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="type"
type="ns:MyType"
default="Value"/>
I would like to write a C# object created via the XSD.exe out via the XmlSerializer
with one of these attributeValue types. Is it possible to force the serializer to write out the type
attribute even when it is equal to the default?
Note that I cannot modify the XSD and I'd like to avoid modifying the C# POCO generated via XSD.exe as this will change in the future and I'd like to avoid the maintenance overhead.