XML vrs Standard Textfile.

NJDubois

Well-known member
Joined
May 15, 2008
Messages
84
Programming Experience
Beginner
XML sounds like a really nice format to save program settings in, but in older versions of VB, I just used a standard text file. So my question is this, what are the benefits of using an xml file, and what are the benefits of using a text file?

What I am doing is making a menu program that will aid as a shortcut to a notepad, common used programs, bookmarks and contacts. The way I have the menu pop up is kinda a secret at the moment(it is working perfectly, and is amazing!!), but as soon as its to my liking I plan on posting it on a site like downloads.com for all the world to play with.

Right now I only have to variables that I am saving, but in the near future I plan on adding a 'skin' feature to my program where you can draw your own button up and down image, as well as the form background images. There will also be a recent document list. Of course I plan on expanding this as much as I can. Even adding the ability to have sub folders linked to menu items that are completely customizable so if a user is a web page developer they can add there own menu item with all the html files they are using.
 
XML files are physically saved as plain text, but the advantage of XML is that all of the data are stored as "records" and each field are tags.

All of your data would be stored in an easy to understand and easy to read/write format. For the app you're describing, I recommend XML over plain text.
 
Thank you!

Well, XML it will be. Once I get to the point where I have settings I want to load I will learn, and use XML.

Thanks for the reply!
 
Just a tip, in VS 2005 and 2008 you can use My.Settings to achieve this since My.Settings is actually an XML file anyways.
 
Back
Top