Posted on: 5/25/2014 6:38:29 PM | Views : 365

Hi frnds,
I have a class Employee
public class Student
{
public string name{get;set;}
}
I have class Department
public class Department
{
[XmlElement(ElementName="emps")]
public List<Employee> employees{get;set;}
}
My out should be like:
<emps>
<emp>
  <name>name1</name>
</emp>
<emp>
<name>name2</name>
</emp>
<emps>
I am getting emps, but I am not getting as emp...I am getting as employee, to get so what attribute i should add, XmlRoot is not working.
Please let me know if there is any another way

Thanks,
Raj4MS

Go to the complete details ...