|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
XML Array serialization problemI 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 -------------------------------- From: Raj Suryadevara ----------------------- Posted by a user from .NET 247 (http://www.dotnet247.com/) <Id>jWqqrh3/J0+1/X4AiexcDQ==</Id> |
|||||||||||||||||||||||