c# xml serializable multiple arrayitems

lightship

New Member
I having a rather fatuous issue while trying to get my programming to deserialize multiple XmlArrayItem's.The XML basically looks like this:\[code\]<Root2> <Data2> <HOLD> ... </HOLD> <CUST_HOLD> ... </CUST_HOLD> </DATA2></ROOT2>\[/code\]And my serializable code like this:\[code\][Serializable()][System.Xml.Serialization.XmlRoot("Root2")]public class Root2{ [System.Xml.Serialization.XmlArray("Data2")] [System.Xml.Serialization.XmlArrayItem("CUST_HOLD", typeof(CUST_HOLD))] public CUST_HOLD[] CUST_HOLD { get; set; } [System.Xml.Serialization.XmlArrayItem("HOLD", typeof(HOLD))] public HOLD[] HOLD { get; set; } }\[/code\]I tried different configs, but this is the only one that doesn't result in an error.But the problem is, only the first XmlArrayItem gets processed (in this case CUST_HOLD).The other remains null, while there should be at least one item within the corresponding array.
 
Back
Top