Including xml attribute when the value is the same as the default
问题 i have an xsd we use with the XMLSerializer class in .net to generte an xml document. We have the following type with a default value <xs:complexType name="telephoneType"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="type" default="BH"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="BH"/> <xs:enumeration value="AH"/> <xs:enumeration value="mobile"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:extension> </xs:simpleContent> It