On Fri, 9 Jul 2010 14:30:03 +0100
Graham Beint <
graham.beint@sophos.com> wrote:
> > but a section must not contain sub-sections inside it, i.e. section
> > cannot recurse:
>
> Why not you may want a value to be a structure.
Because I think it might get a bit messy. Sections are used to simply
group similar items together, you can structure your data inside
sections:
logging
{
buffer_size: 2K;
flush_intv: 5;
server_log:
file:/var/log/ws.log1,
file:/var/log/ws.log2,
syslog:facility=log_daemon & level=log_info;
}
the above could be specified as C structures:
struct loggin
{
int buffer_size;
int flush_intv;
struct server_log
{
struct file_log *file_log; /* dynamic array */
struct system_log *system_log; /* dynamic array */
};
};
> XML?
>
> Simple to load none or more XML structures and merge/overlay them
> from string, file or URL.
Yeah I thought about it, you can do it with XML but it's too verbose.
You look at XML config files and it makes your head hurt.