VB.net XML Serialization/Deserialization, How to Put Attributes for Lists



If I wanted to serizlize and deserialize an XML like this in VB:



<SeveralListsOfPeople>
<ListOfPeople groupname="Friends">
<Person name="John">
</Person>
<Person name="Mary">
</Person>
</ListOfPeople>
<ListOfPeople groupname="Family">
<Person name="Karen">
</Person>
<Person name="Kyle">
</Person>
</ListOfPeople>
<ListOfPeople groupname="Enemies">
<Person name="Ben">
</Person>
<Person name="Chris">
</Person>
</ListOfPeople>
</SeveralListsOfPeople>


How would I add the attribute to "SeveralListsOfPeople"? I can't figure out how to add attributes to lists or arrays.


No comments:

Post a Comment