lets say I have this model
class Color
{
string name;
string type;
}
Class ColorsList
{
List<Color>;
}
and I need to populate those classes to xml
<ColorsList>
<Color>red
<type>brush</type>
</Color>
<Color>blue
<type>spray</type>
</Color>
</ColorsList>
I cant change my classes structure cause in that way I can bind it to a grid control.
what is the best practice for such a thing? is there a simple way to do that? I was thinking of creating a different model for the xml..