[property_tree] include directive for non-info files

Hi, In Boost.PropertyTree, INFO format has the nice #include directive. But it seems you cannot include other formats. Typically such INFO file, key { #include_xml "my.xml" } with "my.xml" : <root><child>kid</child></root> could give : get<std::string> ("key.root.child") == "kid" A very quick look at info parser makes me think that it would be easy to implement. Any comment ? Regards, Ivan

On 29.09.2011 16:18, Ivan Le Lann wrote:
Hi,
In Boost.PropertyTree, INFO format has the nice #include directive. But it seems you cannot include other formats. Typically such INFO file,
key { #include_xml "my.xml" }
with "my.xml" :<root><child>kid</child></root>
could give : get<std::string> ("key.root.child") == "kid"
A very quick look at info parser makes me think that it would be easy to implement. Any comment ?
This is a strange request. What is your use case? I'm rather disinclined to implement it, since it would create cross-dependencies between the various parsers. Sebastian
participants (2)
-
Ivan Le Lann
-
Sebastian Redl