The inverse question of How can I transform XML into a List or String[]?.
I have a List<string>
of users and want to convert them to the following xml :
<Users>
<User>Domain\Alice</User>
<User>Domain\Bob</User>
<User>Domain\Charly</User>
</Users>
I am currently wrapping this list in a class and use XmlSerializer
to solve this but I find this quite heavy ...
So is there a more straightforward solution using Linq to Xml ?