Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

Controling XML Serialization

$
0
0

Hi to all,

XML Example into msdn documentation,

publicclass Group{ [XmlArrayItem(Type = typeof(Employee)), XmlArrayItem(Type = typeof(Manager))]public Employee[] Employees; }publicclass Employee{publicstring Name; }publicclass Manager:Employee{publicint Level; }

This serialize into XML :

<Group><Employees><Employee><Name>Haley</Name></Employee><Employee xsi:type = "Manager"><Name>Ann</Name><Level>3</Level><Employee></Employees ></Group>

How add attribute serialization for serialize in this XML ?

<Group><Employees><Employee><Name>Haley</Name></Employee><Employee>

<Manager><Name>Ann</Name><Level>3</Level>

</Manager><Employee></Employees ></Group>

ok is need to add XMLInclude of type manger but for requeriments of mi client i need to "convert manager type in

data element"

Thanks , to all

Jordi


Jordi Burgas



Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>