|
Boost : |
From: Marcin Kalicinski (kalita_at_[hidden])
Date: 2006-04-21 18:16:31
>> You are talking about Program Options library. I don't quite agree it
>> covers the same problem domain. I feel it is more focued on command-line
>> than on reading configuration in general. The biggest difference is that
>> property_tree is a DOM, not a linear structure.
>
> If that's DOM, then why the interface is so radically different from W3W
> DOM
> spec? I understand that you mean "DOM" in the broad sense, but anyway, all
> libraries that pretend to working with XML are using specific DOM
> interface. It might not be excellent, but it allows one to write
> essentially the same code using all existing libs.
The reason why it does not use W3C DOM standard, is because this is not an
XML library. It is meant to support as much hierarchical file formats as
possible. I believe this can be achieved only through making it as general
as possible - thus only one string per data and one string per key (apart
from traits customization, which is another story). No "special" nodes, like
comments, leaves/branches, attributes etc. The nice side effect of that
simplicity is that the library is extremely easy to use in many cases. Think
about _three_ lines of code and one include to read arbitrarily-typed value
from a config file - in any supported format. I don't think this can be
matched by W3C DOM.
Best regards,
Marcin
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk