This is the part that does not work:
[XmlAttribute]
[XmlArray("unit-category")]
[XmlArray]and [XmlAttribute]cannot be defined in the same property.
If you continue to drill in .InnerExceptionuntil you reach the problem of the original , the serializer will even tell you the following:
There was an error reflecting type 'ArmyListing'.
There was an error reflecting property 'listing'.
There was an error reflecting type 'Army'.
There was an error reflecting property 'settingconstraints'.
XmlAttribute and XmlAnyAttribute cannot be used in conjunction with XmlElement, XmlText, XmlAnyElement, XmlArray, or XmlArrayItem.
source
share