How do I interpret the format of the .flame files used by apophysis?
There is some information about the XML file format used for .flame files. There are a number of forks of this program written in different languages, the original site is by definition the place to go for answers; unless you are using a fork - the original  seems to have been abandoned years ago.

Coefs is 6 floats which defines the coefficients for the affine part of the function, in row order (a d b e c f). Xform has an interpolation_type which is a string describing the method for interpolation of xform positions: options are "log", "linear", "old", etc. (a list of a few dozen options is here). There can be multiple xforms, each applies a transformation to the previous state.

The spherical transform is complex, there's a 19 page .docx tutorial with 9 pages of examples at: "Understanding Spherical Transforms: Apophysis Tut" by UniversalKinase (direct link to .ZIP file). Another tutorial is "Apo-Tuto Sphericals" by Fiery-Fire.