Mostly internal functions for adding XML content to an external file
Not for use as exported functions
Either the filename written to, or NULL
Volker Sorge and A. Jonathan R. Godfrey