Hi,
I have a database with some data in it. My application reads this database and orders the data into a Treeview.
Now, I would like to stop using the database since the requirement of a database connection etc etc are a bit too much hassle for something that I'm sure can be done much easier.
Also, it is supposed to be read only, the user cannot edit it, so there is really no need for a database, right?
My idea was to use an XML file instead of the database.
Now, I know nothing about XML so I hope you guys could tell me if it was possible, and how I should start using it?
My data is order something like this:
First of all, there is a "Category" field. There are about 10 categories.
Then, in each of the categories, there are "Commands". Each command also has a "Description".
Something like this:
Could you show me roughly how this would look in XML?Code:CATEGORY | COMMAND | DESCRIPTION ----------|-----------|------------- Cat. 1 | Command 1 | This is command 1. Cat. 1 | Command 2 | This is command 2. Cat. 1 | Command 3 | And command 3. Cat. 2 | Command 1 | This is command 1, in Cat 2 Cat. 2 | Command x | Blaa... Cat. 3 | ... | ...
Thanks!
Something I came up with, I have no idea if it's right:
Code:<category CAT="Cat. 1"> <command COM="Command 1"> <descr>This is command 1.</descr> <descr2>Some other description, also for Command 1</descr2> </command> <command COM="Command 2"> <descr>This is command 2.</descr> <descr2>Some other descr. for command 2</descr2> </command> etc... </category> <category CAT="Cat. 2"> <command COM="Command 1"> <descr>This is command 1, in Cat 2</descr> <descr2>Some other...</descr2> </command> etc... </category> etc...
EDIT
I have also found examples that handle it like this, what would be more easy to acces ?
Code:<category> <name>Cat. 1</name> <command> <name>Command 1</name> <descr>This is command 1.</descr> <descr2>Some other description, also for Command 1</descr2> </command> </category>




Reply With Quote