I have a xml template like this
<User>
<UserId></UserId>
<UserName></UserName>
<Roles>
<Role></Role>
<Roles></Role>
</Roles>
</User>
Form this xml template file,dynamicaly i want to generate an xml.How can i do this.
Output xml should look like this
<User>
<UserId>user1</UserId>
<UserName>fr</UserName>
<Roles>
<Role>abc</Role>
<Role>def</Role>
</Roles>
</User>
How can i achieve this.What all changes i need to make in template file.How to read and create xml from this tempalte xml file using c#.