Does there exist an existing config file format that works in the same way as HTML+CSS?
I would like to specify a config file for some software that uses the css method of declaring properties, i.e. in any order you want, hierarchical, of specific elements/entire types/entire classes, ability to override.
Yaml can override properties, but its unwieldy.
An example of what I'd be looking for
programSegment
{
maxDuration: 1000
}
programFeature1
{
iterations: 10;
maxDuration: 30;
}
#specificInstance
{
iterations: 1000;
}
.instanceType
{
maxDuration: 10;
}
<programFeature1 id="one" />
<programFeature1 id="specificInstance" />
<programFeature1 id="three" class="instanceType" />
<programSegment>
<programFeature1 id="four" />
<programFeature1 id="five" class="instanceType" />
</programSegment>
Ideally this would enable me to fire up 5 instances of some feature in my program, each with some differently configured properties according to their id/class/type/parent.
Ideally I'd be able to grab the properties without having to traverse the heirarchy myself.
Does a different format like this exist? What is it?
Are there any generic css/xml parsers for cpp that will work like this?