Hi everyone

I'm in the process of designing a solution to manage config files which look something like this:

config firewall service category
    edit "General"
        set comment "General services."
    next
    edit "Web Access"
        set comment "Web access."
    next
    edit "File Access"
        set comment "File access."
end

Some of you may recognize this as the config for a fortigate firewall. It's tab indented, so while it looks a bit yaml-ish it isn't.

With a mix of POJO/ Dataformat clauses I'm hoping to map this from JSON/ XML to a templating system in order to generate files similar to the snippet above.

I tried googling about camel and tab indentation but only find references to bindi which is used for csv/tsv files, this is not quite the same use case.

Worst case scenario I guess I'd do it with some kind of hack in xslt/xquery to make it "look" like this, but that feels like a hack

Any thoughts, or suggestions welcome

Thanks
Riaan

Reply via email to