Link to home
Start Free TrialLog in
Avatar of visualbasic
visualbasicFlag for Ireland

asked on

Why use xml over ini files

I have just began a new project and have decided to use XML or XLS files to store project data instead of INI files.Should I stay with *.ini or should  I change?? Which type should I use?? what is the difference between XML and XLS
when I read and write to an Ini file  I use the following code.what do I use for XML or XLS?


Option Explicit

Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpstring As Any, ByVal lpFileName As String) As Long

Public Function WriteIniInfo(FileName As String, AppName As String, KeyName As String, StringName As String)
Dim x As Boolean
    x = WritePrivateProfileString(AppName, KeyName, StringName, FileName)
End Function

Public Function GetIniInfo(FileName As String, AppName As String, KeyName As String)
Dim A As String
Dim i As String
 A$ = Space$(255)
     i = GetPrivateProfileString(AppName, KeyName, "", A$, 300, FileName)
      GetIniInfo = Left$(A$, i)
End Function
ASKER CERTIFIED SOLUTION
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Anthony Perkins
>>XLS is the file format supported by Microsoft Excel, I personally wouldn't even consider this for this task.<<

I suspect the questioner mistyped and meant to write XSL.

Anthony
Avatar of CleanupPing
CleanupPing

Hi visualbasic,
This old question (QID 20558480) needs to be finalized -- accept an answer, split points, or get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.