hello.,
how to sort nodes in the xml file and save file in sorted order using linq?
if this is my xml file,
<Persons>
<Person>
<id>2</id>
<Name>xxx</Name>
</Person>
<Person>
<id>3</id>
<Name>yyy</Name>
</Person>
</Persons>
when inserting new node., it should be inserted as like this.
<Persons>
<Person>
<id>1</id>
<Name>zzz</Name>
</Person>
<Person>
<id>2</id>
<Name>xxx</Name>
</Person>
<Person>
<id>3</id>
<Name>yyy</Name>
</Person>
</Persons>
how to do this using linq?
thank you