I really don`t like xml. Therefore I struggle with the even most easiest task. Thats annoying.
<Committee Name="xxxx" CanVote=True Id=3 />
<Committee Name="yyyy" CanVote=False Id=1 />
<Committee Name="bbbb" CanVote=True Id=2 />
<Committee Name="cccc" CanVote=False Id=4 />
At the beginning the file is empty with only: <Committees />
Then I have a Committee class with some properties like above in the .XML.
When I iterate the List<Committee> I want to search for every Committee.Id in
the .XML so in each <Committee ....>.
IF the Id is matching I want to update the CanVote = with the Committee.CanVote value. from the List.
Else the Node <Committee Name=... ... /> must be Inserted
and... How does XLinq behave when I want to update a XElement which is not existing does it make an Insert automatically?