Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pros and cons of .ini and .xml files?

Status
Not open for further replies.

THOMASNG

Technical User
May 3, 2002
254
US
I've been using simple ASCII text files for
data storage, but now that we're getting into
trading data with databases, a choice is to use
.ini or .xml files.
Any opinions?
 

They are both ascii text based just like your text files that you presently use except for their format. You can treat an xml file like an object and enumerate throught its nodes and sub nodes. An ini file you can treat like a limited directory structure if you so wished. Between the two choices (ini versus xml) I think I would choose the xml format since MS has so much support for it (that and ini files are from the days of win 3.1(1)).

I hope this helps, Good Luck

 
I concure.
But mainly because you say you want to exchange this info with other apps (database in this case) and other programs are so much more likely to have some import from xml than they would from INI files....hell I can't think of any programs that import from ini files off the top of my head.
 
It depends on what you want to store and what you want to do with it. INI files were meant for program settings and are divided into chapters with entries. If that is what you want, and want a readable settings file, use an INI file. And if you don't want the file, use the registry.

XML is more meant for general structures, like object structures. If you want to store structured data, use XML. It is better imported, but you still have to know the structure of your specific XML file to do a useful import.

If you have table-structured data, the good old CDF (Comma Delimited Format) file is still unbeatable. It is the most widely imported text file type I know of.

Best regards
 
Is CDF similar to CSV (comma separated values)?
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top