I’m developing a Windows Phone 7.5 app.
I have to store 22 items with the following fields:
- Number (int).
- Name (string).
- Description (string).
Name and description will be in various languages.
Now, I’m using a XML file like this:
<?xml version="1.0" encoding="utf-8" ?>
<cards>
<card id ="0" name="Mad" description="xxx" ></card>
...
</cards>
I haven’t work with XML a lot, and I’m not sure which is the best way to do it.
Any advice? What do you recommend me? I need to store each name and description in different lanaguages.
I would structure your xml as follows
By having it in this structure you only have 1 attribute per element and it is easy to find child elements which is the data you are looking for.
Actually there is another question that goes over this
XML best practices: attributes vs additional elements