XML Serialization problem
XML / XSL
1
Posts
1
Posters
0
Views
1
Watching
-
Hi I am using XML serializationn in C#. I have code like this. public class Doc { [XmlArrayItem (ElementName="TNArray", Type=typeof(ReTN[]))] public object[] Obj; } [XmlRoot("TNA")] public class ReTN {something...} Here I am trying to set XML node as "TNA" instead of class name "ReTN". [XmlRoot("TNA")] works when I serialize single object, that means when I say [XmlElement(Type=typeof(ReTN))]. In single object case I am getting node name as "TNA". If I serialize array of objects as I was doing above it gives class name("ReTN") as node name. Any thoughts. Any help is greatly appreciated. Thanks Raj