Boost logo

Boost :

From: Lee Houghton (boost_at_[hidden])
Date: 2006-04-19 18:22:42


Marcin Kalicinski wrote:
>> Two things that I had to roll into my config system:
>> a) ability to include other files
>
> This is a parser job to handle includes. Of the parsers included with the
> library only INFO supports them, but I believe other formats (XML, JSON,
> INI) do not have a notion of include at all.

XML itself may not have a notion of inclusions, but you could still
emulate them. To use the five minute tutorial's example:

     <debug>
         <filename>debug.log</filename>
         <pt:include src="debug-modules.conf" />
         <level>2</level>
     </debug>

and in debug-modules.conf, you'd have:

     <modules>
         <module>Finance</module>
         <module>Admin</module>
         <module>HR</module>
     </modules>

This could pose problems with interoperability, depending what other
programs and libraries you include to use the XML file with. Another
problem is that while this could be done in the parser, it may be more
suited elsewhere.

-Lee


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk