Configuration using XML
FreeSWITCH uses XML to represent its configuration, because XML lends itself perfectly (and directly) to a tree representation in which you can add and delete branches and leaves and easily locate sections, parameters, and values. Optimized XML routines are able to parse, create an in-memory representation, and manipulate that representation.
So, you'd better stop whining and learn to love XML.
There are many advanced facilities to help parse FreeSWITCH's configuration files; check syntax; associate settings, parameters, names, descriptions, allowed values' ranges; and many more.
In our implementation we keep it simple to the max (we love kisses), and only use the most basic XML related functions.
We create our XML pointers, then we raze the globals
data structure we'll use to store state and configuration (you'd better do this razing, or you'll end up with stale values if you unload then reload the module).
switch_xml_open_cfg()
will read our XML configuration file and...