docs: def writeXMLFile(filename, content):
      """ Used only for debugging to write out intermediate files"""
      xmlfile = open(filename, 'w')
      # pretty print
      content = etree.tostring(content, pretty_print=True)
      xmlfile.write(content)
      xmlfile.close()