I am not trying to save dataset or datatable to a xml file rather create a xml structure for saving related data? For example i would like to know how below data could be in a xml file
User
UserId
Username
Password
Roles
RoleId
UserId [FK]
CreatedOn
will it look like this
<User userid="" username="" password="">
<Roles id="">
<Name></Name>
<Description></Description>
</Roles>
</User>
which structure would be best to use xml files as DB
I think you want to consider implementing the XML in a more normalized manner, similar to how you would do so with a relational database. For instance in your current solution you would be required to type out the entire role structure within every user such as
A normalized structure could look like the following
Hope this helps