08-11-2008, 07:29 PM
XML can really organize data where it can be called back in very specific ways. I'm fairly new to it myself, really the last couple of weeks, but already I've been able to revolutionize the way that I store and get data in forms that I've created. It is really a powerful tool!
I started off actually using Excel to store and get information. It worked pretty nice because I could store to and call back specific cells. The big problem with that was that it was very slow...very very slow because excel had to open and close and just didn't run fast enough. Then I moved over to .ini files which lasted about a week. I thought they were really cool because you could have a key, a variable, and data. I would also use the file name in a directory to further organize. Using the file names worked pretty good to populate ComboBoxes with a directory.
With XML you can do all of that and much more in one file that runs super fast. Since the markups in XML are all user defined, you can just keep digging in deeper and deeper. When you callback data, you can define a specific XML path...and whammo, data is available!
This first example shows a program that I created using .ini and then one that Gintaras worked up with XML.
The XML is just a lot more streamlined and open to do more. Gintaras also has a way to populate a ComboBox with data in an XML file in this one:
http://www.quickmacros.com/forum/showthr...p?tid=2624
This next example shows XML with data separated with delimiters...another way you can store things.
http://www.quickmacros.com/forum/showthr...p?tid=2614
This example uses XML to store the coordinates of a edit box in without even having to hit an update box. It just automatically saves the data.
http://www.quickmacros.com/forum/showthr...p?tid=2643
Trust me and use XML
I started off actually using Excel to store and get information. It worked pretty nice because I could store to and call back specific cells. The big problem with that was that it was very slow...very very slow because excel had to open and close and just didn't run fast enough. Then I moved over to .ini files which lasted about a week. I thought they were really cool because you could have a key, a variable, and data. I would also use the file name in a directory to further organize. Using the file names worked pretty good to populate ComboBoxes with a directory.
With XML you can do all of that and much more in one file that runs super fast. Since the markups in XML are all user defined, you can just keep digging in deeper and deeper. When you callback data, you can define a specific XML path...and whammo, data is available!
This first example shows a program that I created using .ini and then one that Gintaras worked up with XML.
The XML is just a lot more streamlined and open to do more. Gintaras also has a way to populate a ComboBox with data in an XML file in this one:
http://www.quickmacros.com/forum/showthr...p?tid=2624
This next example shows XML with data separated with delimiters...another way you can store things.
http://www.quickmacros.com/forum/showthr...p?tid=2614
This example uses XML to store the coordinates of a edit box in without even having to hit an update box. It just automatically saves the data.
http://www.quickmacros.com/forum/showthr...p?tid=2643
Trust me and use XML