I have an object that has a list of abstract 'aninamls'. i.e.
var animals = new Animals
{
new Bird{ TailFeatherColour = "Blue" },
new Cat{ Colour = "Brown" }
};
using the xmlserializer, is it possible to serialize the above to the following xml,
<?xml version="1.0" encoding="utf-16"?>
<Animals>
<Bird>
<TailFeatherColour>Blue</TailFeatherColour>
</Bird>
<Cat>
<Colour>Brown</Colour>
</Cat>
</Animals>
at the moment, I can only get the following:
<?xml version="1.0" encoding="utf-16"?>
<Animals>
<Animal xsi:type="Bird">
<TailFeatherColour>Blue</TailFeatherColour>
</Animal>
<Animal xsi:type="Cat">
<Colour>Brown</Colour>
</Animal>
</Animals>