[Lazarus] Why was XML format chosen for storing settings in Lazarus IDE?

Graeme Geldenhuys graemeg.lists at gmail.com
Fri Jun 18 14:08:38 CEST 2010


On 18/06/2010, Marco van de Voort  wrote:
>
> The simple reason is that .ini is one level only, and XML has an infinite
> nesting depth.

Technically yes, but also no.  For example. 'regedit' in Microsoft
Windows can export the registry (a f***ken huge tree and garbled mess)
to a .reg text files which is in fact a INI file. They use nesting as
follows, which could very easy be added to TINIFile (and I'm actually
thinking of doing this - see below).

--------------------------
[Level1]
Version=8

[Level1\Level2]
Company=Widgets Inc.

[Level1\Level2\Level3]
FullName=John Doe
Age=35
--------------------------

The TINIFile's Section support could be extended to use '\' which
means no real change needed, or implement a dot notation. eg: A nested
section or value can be referenced as Level1.Version or
Level1.Level2.Level3.FullName



-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/




More information about the Lazarus mailing list