How about something like:
class Breed
{
[XmlText]
string Name;
[XmlAttribute]
string type;
}
class Dog
{
Breed breed;
}
Type, like the breed's name is a property on its own. Both are kind of
attributes on breed. Only complex types (classes) can have more than one
property.
HTH,
www.sportbootcharter.com
Axel Dahmen
--------------------
"Giles M" <Gi****@discussions.microsoft.com> schrieb im Newsbeitrag
news:78**********************************@microsof t.com...
i need to serialize my class into xml that looks like this:
<dog>
<breed type="large">spaniel</breed>
</dog>
but i'm not sure how to get an attribute into a property of my class, i
can use the xmlattribute tag to make an attribute of my dog class but i want
an attribute on my property, is this possible? if so how do i do it?
many thanks
Giles Morris